-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add optional Access-Control-Max-Age header to CORS plugin (#2331)
Hi there As discussed in this [issue](#2212), the CORS plugin in Apollo Router currently lacks setting the Access-Control-Max-Age header. This PR adds a new option called max_age that is used like so: ``` cors: max_age: 86400 ``` This does not solve the Cache-Control header mentioned in issue as it's a bit separate from CORS. New test(s) and documentation changes haven't been done yet as I wanted to confirm this is fine before proceeding further. If so, happy to do them. Thanks! (FYI I don't have the ability to assign a reviewer or anything, if we're able to do that) Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> Co-authored-by: Simon Sapin <simon@apollographql.com> Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
- Loading branch information
1 parent
8c5f903
commit 84f38fa
Showing
5 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters