Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

Add header to cache CORS preflight requests #466

Merged
merged 4 commits into from
Sep 29, 2015
Merged

Conversation

leplatrem
Copy link
Contributor

ref Kinto/kinto#185

Requires Cornices/cornice#338

  • Take cors max age from settings
  • Test app initialization with custom setting

@leplatrem
Copy link
Contributor Author

This is ready to be reviewed, but waiting for cornice release.

Should require a cornice git tag rev instead, at least during dev ?

@leplatrem
Copy link
Contributor Author

@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
Copy link
Contributor

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.

Copy link
Contributor Author

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?

@almet
Copy link
Contributor

almet commented Sep 29, 2015

r+!

Natim added a commit that referenced this pull request Sep 29, 2015
Add header to cache CORS preflight requests
@Natim Natim merged commit 19081bd into master Sep 29, 2015
@Natim Natim removed the in progress label Sep 29, 2015
@Natim Natim deleted the cache-cors-headers branch September 29, 2015 15:38
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.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants