fix(cors): cache preflight with Access-Control-Max-Age=600 (PMS-389) #289

Merged
vas2000-work merged 1 commit from fix/PMS-389-cors-max-age into main 2026-06-17 02:30:56 +02:00
Owner

The CorsLayer set allow_origin/methods/headers/credentials but no max_age, so browsers got no Access-Control-Max-Age and re-issued an OPTIONS preflight before most credentialed requests. docs/cors.md §5 specifies 600. Add .max_age(600s).

Verified in-container (just pre-commit): fmt + clippy -D warnings + check + unit + doc tests green.

Fixes PMS-389.

The CorsLayer set allow_origin/methods/headers/credentials but no max_age, so browsers got no Access-Control-Max-Age and re-issued an OPTIONS preflight before most credentialed requests. docs/cors.md §5 specifies 600. Add `.max_age(600s)`. Verified in-container (`just pre-commit`): fmt + clippy -D warnings + check + unit + doc tests green. Fixes PMS-389.
fix(cors): cache preflight with Access-Control-Max-Age=600
All checks were successful
E2E / Playwright against staging (pull_request) Successful in 1m6s
Check / fmt + clippy + compile + unit/doc tests (pull_request) Successful in 2m26s
Integration / integration tests (pull_request) Successful in 9m16s
Create release / Create release from merged PR (pull_request) Has been skipped
f200bd3481
The CorsLayer set allow_origin/methods/headers/credentials but no max_age,
so browsers received no Access-Control-Max-Age and re-issued an OPTIONS
preflight before most credentialed requests (Chrome default ~5s). docs/cors.md
§5 specifies Access-Control-Max-Age: 600. Add .max_age(600s) to the layer.

#PMS-389

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
vas2000-work deleted branch fix/PMS-389-cors-max-age 2026-06-17 02:30:56 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-server!289
No description provided.