This repository has been archived by the owner on Mar 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Add header to cache CORS preflight requests #466
Merged
Merged
Conversation
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
leplatrem
force-pushed
the
cache-cors-headers
branch
from
September 28, 2015 16:52
22f4924
to
8de7a1d
Compare
This is ready to be reviewed, but waiting for cornice release. Should require a cornice git tag rev instead, at least during dev ? |
leplatrem
force-pushed
the
cache-cors-headers
branch
from
September 29, 2015 13:06
8de7a1d
to
0c383f8
Compare
@ametaireau r? |
@@ -130,6 +131,9 @@ def includeme(config): | |||
Service.cors_origins = tuple(aslist(cors_origins)) | |||
Service.default_cors_headers = ('Backoff', 'Retry-After', 'Alert', | |||
'Content-Length') | |||
cors_max_age = settings['cliquet.cors_max_age_seconds'] | |||
Service.cors_max_age = int(cors_max_age) if cors_max_age else None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I prefer to have the "if" at the beginning of the line to ease readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well this can be discussed in this particular case :) It is a safety check and it allows the main flow to remain concise... Matter of taste?
r+! |
Natim
added a commit
that referenced
this pull request
Sep 29, 2015
Add header to cache CORS preflight requests
glasserc
pushed a commit
that referenced
this pull request
May 20, 2016
Possibility to exclude default bucket plugin (fixes #466)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ref Kinto/kinto#185
Requires Cornices/cornice#338