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 preflight responses #152

Closed
jub0bs opened this issue Jun 9, 2023 · 1 comment
Closed

No way to disable caching of preflight responses #152

jub0bs opened this issue Jun 9, 2023 · 1 comment

Comments

@jub0bs
Copy link
Contributor

jub0bs commented Jun 9, 2023

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 instructs browsers not to cache that preflight response. However, rs/cors ignores that distinction and takes a maxAge value of 0 as a cue to omit the Access-Control-Max-Age header. Therefore, rs/cors prevents its users from disabling caching of preflight responses.

@jub0bs
Copy link
Contributor Author

jub0bs commented Sep 5, 2023

Nice.

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

1 participant