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

Add configurable Access-Control-Max-Age header to CORS policy #1246

Closed
GeroldSchierholz opened this issue Jan 6, 2021 · 1 comment
Closed

Comments

@GeroldSchierholz
Copy link

CORS policy is a great and easy to use policy to enable CORS requests. It would be even better, if also browser caching of the CORS response would be enabled / configurable. Therefore the standard header 'Access-Control-Max-Age' should be available in CORS policy.

Version

all / latest

Steps To Reproduce

Configure api. Add CORS Policy. CURL with method OPTIONS.

Current Result

Only the following headers are set:

Access-Control-Allow-Headers
Access-Control-Allow-Methods
Access-Control-Allow-Origin
Access-Control-Allow-Credentials

Max Age is missing and would help to avoid unnecessary OPTIONS calls before every request.

Expected Result

Add a configurable (maybe default 600) Access-Control-Max-Age Header to CORS Response

@GeroldSchierholz
Copy link
Author

Thx for the fast implementation. Looking forward to test it when released.

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