flask-cors
flask-cors copied to clipboard
add support for a dynamic origin
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.
@corydolphin Any chance to have this reviewed ?