Adding support for ISSO_CORS_ORIGIN env variable to allow defining wildcard CORS origins

This commit is contained in:
Cimon Lucas (LCM) 2018-02-21 18:54:48 +01:00 committed by Benoît Latinier
parent af3903e462
commit 361c596bf2

View File

@ -84,6 +84,8 @@ def origin(hosts):
hosts = [urlsplit(h) for h in hosts]
def func(environ):
if 'ISSO_CORS_ORIGIN' in environ:
return environ['ISSO_CORS_ORIGIN']
if not hosts:
return "http://invalid.local"