mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-21 21:09:00 +00:00
fix(remote): scope auth header attachment to comfyApi client only
Only fetch and attach the platform auth header when descriptor.client === 'comfyApi'. The RemoteRequestClient union currently only contains 'comfyApi', but this guard prevents future additions from accidentally leaking platform credentials to external/non-platform routes.
This commit is contained in:
@@ -30,9 +30,12 @@ async function executeRemoteRequest(
|
||||
descriptor: RemoteRequestDescriptor,
|
||||
signal: AbortSignal
|
||||
): Promise<unknown> {
|
||||
const authStore = useAuthStore()
|
||||
const authHeader = await authStore.getAuthHeader()
|
||||
const headers = authHeader ? { ...authHeader } : undefined
|
||||
let headers: Record<string, string> | undefined
|
||||
if (descriptor.client === 'comfyApi') {
|
||||
const authStore = useAuthStore()
|
||||
const authHeader = await authStore.getAuthHeader()
|
||||
headers = authHeader ? { ...authHeader } : undefined
|
||||
}
|
||||
const url = resolveUrl(descriptor, getComfyApiBaseUrl())
|
||||
const response = await axios.get(url, {
|
||||
params: descriptor.params,
|
||||
|
||||
Reference in New Issue
Block a user