fix(api-server): allow Idempotency-Key in CORS headers (#3530)
Browser clients using the Idempotency-Key header for request deduplication were blocked by CORS preflight because the header was not listed in Access-Control-Allow-Headers. Add Idempotency-Key to _CORS_HEADERS and add tests for both the new header allowance and the existing Vary: Origin behavior. Co-authored-by: aydnOktay <aydnOktay@users.noreply.github.com> Co-authored-by: Hermes Agent <hermes@nousresearch.com>
This commit is contained in:
@@ -166,7 +166,7 @@ class ResponseStore:
|
||||
|
||||
_CORS_HEADERS = {
|
||||
"Access-Control-Allow-Methods": "GET, POST, DELETE, OPTIONS",
|
||||
"Access-Control-Allow-Headers": "Authorization, Content-Type",
|
||||
"Access-Control-Allow-Headers": "Authorization, Content-Type, Idempotency-Key",
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user