Skip to content

Commit 3f512f5

Browse files
authored
Added PATCH method to CORS headers (#11066)
Added PATCH http method to access-control-allow-header-methods header because there are now PATCH endpoints exposed in the API. See https://github.com/comfyanonymous/ComfyUI/blob/277237ccc1499bac7fcd221a666dfe7a32ac4206/api_server/routes/internal/internal_routes.py#L34 for an example of an API endpoint that uses the PATCH method.
1 parent b94d394 commit 3f512f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ async def cors_middleware(request: web.Request, handler):
9898
response = await handler(request)
9999

100100
response.headers['Access-Control-Allow-Origin'] = allowed_origin
101-
response.headers['Access-Control-Allow-Methods'] = 'POST, GET, DELETE, PUT, OPTIONS'
101+
response.headers['Access-Control-Allow-Methods'] = 'POST, GET, DELETE, PUT, OPTIONS, PATCH'
102102
response.headers['Access-Control-Allow-Headers'] = 'Content-Type, Authorization'
103103
response.headers['Access-Control-Allow-Credentials'] = 'true'
104104
return response

0 commit comments

Comments
 (0)