Skip to content

Commit

Permalink
Use ckan.site.url instead of HTTP_REFERER because the later is not ne…
Browse files Browse the repository at this point in the history
…cessarily defined
  • Loading branch information
domoritz committed Nov 3, 2012
1 parent 409d130 commit 61fe242
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckan/lib/helpers.py
Expand Up @@ -1286,7 +1286,7 @@ def _add_whether_on_same_domain(data_dict):
to true if the resource is on the ckan instance domain
'''
# compare CKAN domain and resource URL
ckan_url = toolkit.request.environ['HTTP_REFERER']
ckan_url = config.get('ckan.site_url', '//localhost:5000')
resource_url = data_dict['resource']['url']

on_same_domain = _compare_domains([ckan_url, resource_url])
Expand Down

0 comments on commit 61fe242

Please sign in to comment.