Skip to content

Commit

Permalink
include auth header if url is internal
Browse files Browse the repository at this point in the history
  • Loading branch information
zelima committed Nov 20, 2019
1 parent a8ca47f commit 36f833e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckanext/archiver/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,8 @@ def download(context, resource, url_timeout=30,

if len(get_sysadmins()) > 0:
sysadmin = get_sysadmins()[0]
headers['Authorization'] = sysadmin.apikey
if url.startswith(config.get('ckan.site_url', '')):
headers['Authorization'] = sysadmin.apikey

# start the download - just get the headers
# May raise DownloadException
Expand Down

0 comments on commit 36f833e

Please sign in to comment.