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 initial support for CORS #133

Merged
merged 10 commits into from
Oct 10, 2016
Merged

Add initial support for CORS #133

merged 10 commits into from
Oct 10, 2016

Conversation

jamesls
Copy link
Member

@jamesls jamesls commented Oct 10, 2016

This adds initial support for CORS, and mimics what the enable CORS button does in the AWS Console.

This is the first item called out in #70 (comment)

The only chance from that comment was that I ended up creating a single arg called cors instead of enable_cors. That way you can either enable cors via cors=True, or you can eventually provide a cors config to control exactly how you'd like cors enabled via cors=CORSConfig(...).

Parts 2 and 3 of the spec will be sent as separate pull requests, and I'll likely need to refactor the internals a bit, but I wanted to get this initial version out before working on parts 2 and 3.

This has the default set of values that mirror
what you get in the console.

It does not yet set up an ``OPTIONS`` method for you.
It's probably worth refactoring this logic into
a separate class, especially when support is added to
configure exactly what CORS settings you want.
@jamesls jamesls merged commit 3c18b2d into aws:master Oct 10, 2016
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

Successfully merging this pull request may close these issues.

1 participant