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

Multipe domain & wildcard support for CORS #13

Open
dschep opened this issue Nov 5, 2019 · 0 comments
Open

Multipe domain & wildcard support for CORS #13

dschep opened this issue Nov 5, 2019 · 0 comments

Comments

@dschep
Copy link
Owner

dschep commented Nov 5, 2019

Enable usage like this, list of domains & support wildcards in strings:

    >>> @cors_headers(origin=['https://example.com', 'https://*.example.com'])
    ... def hello_custom_origin(example, context):
    ...     return {'body': 'foobar'}
    >>> hello_custom_origin({'headers': {'Host': 'https://foobar.example.com'}}, object())
    {'body': 'foobar', 'headers': {'Access-Control-Allow-Origin': 'https://foobar.example.com'}
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

No branches or pull requests

1 participant