datapusher icon indicating copy to clipboard operation
datapusher copied to clipboard

Is it possible to configure a proxy server for datapusher?

Open opensas opened this issue 10 years ago • 2 comments

If I understand correctly when adding a resource (either as a link ot uploading a file) datapusher will try to fetch the contents of the file and the add it to the datastore using the data API.

I wonder is there's some way to configure a proxy server for datapusher to use when fetching files. I already have a global configuration on /etc/enviroment but python doesn't seem to take it into account

opensas avatar Jan 13 '15 22:01 opensas

Yes you can!

Edit the file: /etc/ckan/datapusher.wsgi

And set the same environment variables using Python in there as you do in /etc/environment, like this: os.environ['HTTP_PROXY'] = 'http://myproxyIP:myproxyPORT' os.environ['HTTPS_PROXY'] = os.environ['HTTP_PROXY'] os.environ['http_proxy'] = os.environ['HTTP_PROXY'] os.environ['https_proxy'] = os.environ['HTTP_PROXY']

By the way, the same trick works for /etc/ckan/default/apache.wsgi to get resource_proxy to work behind a proxy.

mattfullerton avatar Oct 21 '15 08:10 mattfullerton

This is now supported without globally changing proxies, using the ckan.download_proxy config option. However, in some cases, such as running on an intranet behind a corporate proxy, globally changing it may still be the better choice.

ThrawnCA avatar Oct 26 '22 01:10 ThrawnCA