diff --git a/ckanext/harvest/harvesters/ckanharvester.py b/ckanext/harvest/harvesters/ckanharvester.py index 4f86032..50202d7 100644 --- a/ckanext/harvest/harvesters/ckanharvester.py +++ b/ckanext/harvest/harvesters/ckanharvester.py @@ -36,6 +36,9 @@ class CKANHarvester(HarvesterBase): ) try: + api_key = self.config.get('api_key',None) + if api_key: + http_request.add_header('Authorization',api_key) http_response = urllib2.urlopen(http_request) return http_response.read()