diff options
| author | Fuwn <[email protected]> | 2026-04-18 08:55:21 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-04-18 08:55:21 +0000 |
| commit | 9aed8f08cd599114515300acd03544b6a6d222d8 (patch) | |
| tree | 0204322f5bed43fee860cd74af0590729c77b347 /static | |
| parent | fix(api): gate badge click-count on Origin and fix 401 response reuse (diff) | |
| download | due.moe-9aed8f08cd599114515300acd03544b6a6d222d8.tar.xz due.moe-9aed8f08cd599114515300acd03544b6a6d222d8.zip | |
fix(cdn): preserve upstream headers alongside CORS and cache overrides
The response was built with `{ "Cache-Control": ..., "Access-Control-
Allow-Origin": ..., ...response.headers }`. Spreading a Headers
instance into a plain object does not expand into own properties, so
upstream headers (including Content-Type) were dropped on the floor.
Build a Headers copy of the upstream response and .set() the overrides
on it, so Content-Type and friends survive alongside the locked-down
CORS origin and long cache policy.
Diffstat (limited to 'static')
0 files changed, 0 insertions, 0 deletions