Commit 3235c26
Fix duplicate CORS headers on proxied responses
The API server's CORS middleware adds Access-Control-Allow-Origin: *,
and the worker's CORS middleware does the same. When the API proxies
worker responses, it forwards all headers including CORS ones via Add(),
resulting in duplicate "*, *" which browsers reject.
Skip Access-Control-* headers when forwarding proxied responses — the
outer server's own CORS middleware already handles these.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent fa2b33a commit 3235c26
2 files changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1061 | 1061 | | |
1062 | 1062 | | |
1063 | 1063 | | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
1064 | 1069 | | |
1065 | 1070 | | |
1066 | 1071 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
305 | 310 | | |
306 | 311 | | |
307 | 312 | | |
| |||
0 commit comments