-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Comments
This was referenced Aug 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Description
Omitting the
Access-Control-Max-Age
header from a preflight response leads browsers to cache that response for 5 seconds, whereas includingAccess-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 of0
as a cue to omit theAccess-Control-Max-Age
header. Therefore, Echo prevents its users from disabling caching of preflight responses.Version/commit
v4.10.2
The text was updated successfully, but these errors were encountered: