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

Setting for Cache-Control to allow preflight requests to be cached in CDNs #251

Closed
2 tasks done
brettwillis opened this issue May 17, 2023 · 1 comment · Fixed by #252
Closed
2 tasks done

Setting for Cache-Control to allow preflight requests to be cached in CDNs #251

brettwillis opened this issue May 17, 2023 · 1 comment · Fixed by #252
Labels
enhancement New feature or request

Comments

@brettwillis
Copy link
Contributor

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

🚀 Feature Proposal

Add a cacheContol option to the settings which will set Cache-Contol header on preflight responses.

A number value would probably set Cache-Control: max-age=${cacheContol}, and a string value would set Cache-Control: ${cacheContol} (fully sepecify the header contents), and otherwise the header would not be set.

Motivation

There is a maxAge option for the Access-Control-Max-Age header. This typically allows preflight requests to be cached in the browser, however typically not by a CDN.

Example

No response

@mcollina
Copy link
Member

Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.

@mcollina mcollina added the enhancement New feature or request label May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants