Skip to content

Commit

Permalink
Change CORS header keys and values to string instead of unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
Lupco Kotev committed Oct 6, 2017
1 parent 71e839a commit 77f886d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ckan/views/__init__.py
Expand Up @@ -62,12 +62,12 @@ def set_cors_headers_for_response(response):
cors_origin_allowed = request.headers.get(u'Origin')

if cors_origin_allowed is not None:
response.headers[u'Access-Control-Allow-Origin'] = \
response.headers['Access-Control-Allow-Origin'] = \
cors_origin_allowed
response.headers[u'Access-Control-Allow-Methods'] = \
u'POST, PUT, GET, DELETE, OPTIONS'
response.headers[u'Access-Control-Allow-Headers'] = \
u'X-CKAN-API-KEY, Authorization, Content-Type'
response.headers['Access-Control-Allow-Methods'] = \
'POST, PUT, GET, DELETE, OPTIONS'
response.headers['Access-Control-Allow-Headers'] = \
'X-CKAN-API-KEY, Authorization, Content-Type'

return response

Expand Down

0 comments on commit 77f886d

Please sign in to comment.