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 support for a dynamic origin #282

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

HHK1
Copy link

@HHK1 HHK1 commented Oct 20, 2020

Why

Fixes #281
Very close to #268 but I need to inject to request's origin in order to dynamically match the origin against a dynamic list.
Also added some unit tests.

What

the origins option can now be a function returning a string, a regex or
a list. Typical usecase is to allow the application to dynamically
determine what the Access-Control-Allow-Origin should be, instead of
injecting the full list of allowed values at app startup.

the origins option can now be a function returning a string, a regex or
a list. Typical usecase is to allow the application to dynamically
determine what the Access-Control-Allow-Origin should be, instead of
injecting the full list of allowed values at app startup.
@HHK1
Copy link
Author

HHK1 commented Nov 18, 2020

@corydolphin Any chance to have this reviewed ?

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.

Support runtime injection of origin
1 participant