Added checkbox to the settings dialog for CORS, also slight changes in the documentation

This commit is contained in:
Gina Häußge committed 2014-06-07 13:21:54 +02:00
1 parent 33005ea243
commit f7e1b39af9
6 files changed
+35 -15

No files matched your search

+1 -2
View File
@@ -93,9 +93,8 @@ def beforeApiRequests():
@api.after_request
def afterApiRequests(resp):
""""""
# Allow crossdomain
# Allow crossdomain
allowCrossOrigin = s().getBoolean(["api", "allowCrossOrigin"])
if request.method != 'OPTIONS' and 'Origin' in request.headers and allowCrossOrigin:
resp.headers['Access-Control-Allow-Origin'] = request.headers['Origin']