Allow '*' in REDASH_CORS_ACCESS_CONTROL_ALLOW_ORIGIN

This commit is contained in:
Allen Short 2016-11-02 16:31:58 -05:00
parent 2f090435a5
commit 6c4294b64d

View File

@ -84,7 +84,7 @@ class QueryResultResource(BaseResource):
if 'Origin' in request.headers:
origin = request.headers['Origin']
if origin in settings.ACCESS_CONTROL_ALLOW_ORIGIN:
if set(['*', origin]) & settings.ACCESS_CONTROL_ALLOW_ORIGIN:
headers['Access-Control-Allow-Origin'] = origin
headers['Access-Control-Allow-Credentials'] = str(settings.ACCESS_CONTROL_ALLOW_CREDENTIALS).lower()