Skip to content

Commit

Permalink
Remove CORS settings check in base.py
Browse files Browse the repository at this point in the history
This check is run as part of the function in `views`/
  • Loading branch information
brew committed Jun 15, 2016
1 parent a3c6ac5 commit 549eb6f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ckan/lib/base.py
Expand Up @@ -274,10 +274,8 @@ def __call__(self, environ, start_response):
return res

def __after__(self, action, **params):
# Do we have CORS settings in config?
if config.get('ckan.cors.origin_allow_all') \
and request.headers.get('Origin'):
set_cors_headers_for_response(response)
set_cors_headers_for_response(response)

r_time = time.time() - c.__timer
url = request.environ['CKAN_CURRENT_URL'].split('?')[0]
log.info(' %s render time %.3f seconds' % (url, r_time))
Expand Down

0 comments on commit 549eb6f

Please sign in to comment.