Skip to content

Commit

Permalink
move cors configuration ckan conf
Browse files Browse the repository at this point in the history
  • Loading branch information
Zharktas committed Nov 1, 2017
1 parent 165a91f commit 17db2b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 0 additions & 4 deletions ansible/roles/ckan/templates/apache2.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ WSGISocketPrefix /var/run/wsgi
#SSLCertificateFile {{ certificates_path }}/{{ssl_crt_primary}}
#SSLCertificateKeyFile {{ certificates_path }}/{{ssl_key_primary}}

# allow CORS
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
Header always set Access-Control-Allow-Headers "X-CKAN-API-KEY, Content-Type"

# Respond to all OPTIONS requests with 200 OK
# This could be done in the webapp
Expand Down
4 changes: 3 additions & 1 deletion ansible/roles/ckan/templates/ckan.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ ckan.locales_filtered_out = en_GB
ckan.feeds.authority_name =
ckan.feeds.date =
ckan.feeds.author_name =
ckan.feeds.author_link =
ckan.feeds.author_link =

ckan.cors.origin_allow_all = True

email_to = {{ error_email }}
error_email_from = {{ error_email_from }}
Expand Down

0 comments on commit 17db2b7

Please sign in to comment.