Skip to content

Commit

Permalink
Merge pull request #4 from keitaroinc/resource-url
Browse files Browse the repository at this point in the history
Resource url
  • Loading branch information
blagojabozinovski authored May 22, 2024
2 parents 352d29d + 1feba1e commit 5cced58
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ckanext/archiver/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,9 @@ def download(context, resource, url_timeout=30,
download_proxy = config.get('ckan.download_proxy')
log.debug('Downloading via proxy %s', download_proxy)
kwargs['proxies'] = {'http': download_proxy, 'https': download_proxy}

url = url.replace(config['ckan.site_url'], "http://localhost:5000")

res = requests_wrapper(log, method_func, url, **kwargs)
url_redirected_to = res.url if url != res.url else None

Expand Down

0 comments on commit 5cced58

Please sign in to comment.