Skip to content

Commit 6edf369

Browse files
committed
fix(manager): migrate 4 endpoints GET→POST for CSRF hardening
Align with Comfy-Org/ComfyUI-Manager#2818 (CSRF Content-Type gate). Convert START_QUEUE, UPDATE_ALL, UPDATE_COMFYUI, REBOOT to POST with body=null and preserved query params where present. Request shape is compatible with both the current GET backend and the upcoming POST-only backend: body=null + axios default application/json header is explicitly allowed by the backend's reject_simple_form_post gate (only x-www-form-urlencoded, multipart/form-data, text/plain are rejected). Refs: Comfy-Org/ComfyUI-Manager#2818
1 parent bea7241 commit 6edf369

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/workbench/extensions/manager/services/comfyManagerService.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export const useComfyManagerService = () => {
126126
}
127127

128128
return executeRequest<null>(
129-
() => managerApiClient.get(ManagerRoute.START_QUEUE, { signal }),
129+
() => managerApiClient.post(ManagerRoute.START_QUEUE, null, { signal }),
130130
{ errorContext, routeSpecificErrors }
131131
)
132132
}
@@ -265,7 +265,7 @@ export const useComfyManagerService = () => {
265265

266266
return executeRequest<null>(
267267
() =>
268-
managerApiClient.get(ManagerRoute.UPDATE_ALL, {
268+
managerApiClient.post(ManagerRoute.UPDATE_ALL, null, {
269269
params: queryParams,
270270
signal
271271
}),
@@ -292,7 +292,7 @@ export const useComfyManagerService = () => {
292292

293293
return executeRequest<null>(
294294
() =>
295-
managerApiClient.get(ManagerRoute.UPDATE_COMFYUI, {
295+
managerApiClient.post(ManagerRoute.UPDATE_COMFYUI, null, {
296296
params: queryParams,
297297
signal
298298
}),
@@ -307,7 +307,7 @@ export const useComfyManagerService = () => {
307307
}
308308

309309
return executeRequest<null>(
310-
() => managerApiClient.get(ManagerRoute.REBOOT, { signal }),
310+
() => managerApiClient.post(ManagerRoute.REBOOT, null, { signal }),
311311
{ errorContext, routeSpecificErrors }
312312
)
313313
}

0 commit comments

Comments
 (0)