Commit 8432f0d
committed
fix(webserver): reflect requested headers in CORS preflight
The OPTIONS preflight returned a fixed Access-Control-Allow-Headers list
(Content-Type, Authorization), so any cross-origin request carrying a
header outside that set (custom X-* headers, x-api-key, etc.) was rejected
by the browser as a CORS failure. Echo back the browser's
Access-Control-Request-Headers instead, falling back to the previous
defaults when none are advertised.1 parent a97a9e3 commit 8432f0d
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
439 | 446 | | |
440 | 447 | | |
441 | 448 | | |
| |||
0 commit comments