From 549eb6f2002cd28008467af78d3ed30828173d60 Mon Sep 17 00:00:00 2001 From: Brook Elgie Date: Wed, 15 Jun 2016 14:11:19 +0100 Subject: [PATCH] Remove CORS settings check in base.py This check is run as part of the function in `views`/ --- ckan/lib/base.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ckan/lib/base.py b/ckan/lib/base.py index 17dc6dc49f9..24b6f3a57fe 100644 --- a/ckan/lib/base.py +++ b/ckan/lib/base.py @@ -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))