Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to disable caching of CORS-preflight responses #2471

Closed
jub0bs opened this issue Jul 5, 2023 · 0 comments
Closed

No way to disable caching of CORS-preflight responses #2471

jub0bs opened this issue Jul 5, 2023 · 0 comments

Comments

@jub0bs
Copy link

jub0bs commented Jul 5, 2023

Issue Description

Omitting the Access-Control-Max-Age header from a preflight response leads browsers to cache that response for 5 seconds, whereas including

Access-Control-Max-Age: 0

in a preflight response instructs browsers not to cache that preflight response. However, Echo's CORS middleware ignores that distinction and takes a MaxAge value of 0 as a cue to omit the Access-Control-Max-Age header. Therefore, Echo prevents its users from disabling caching of preflight responses.

Version/commit

v4.10.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants