diff --git a/authoraffsrv/utils.py b/authoraffsrv/utils.py index 147d65b..d296c4b 100644 --- a/authoraffsrv/utils.py +++ b/authoraffsrv/utils.py @@ -24,10 +24,11 @@ def get_solr_data(bibcodes, cutoff_year, start=0, sort='date desc'): } headers = { - 'Authorization': request.headers.get('X-Forwarded-Authorization', request.headers.get('Authorization', '')), + 'Authorization': current_app.config.get('SERVICE_TOKEN', request.headers.get('X-Forwarded-Authorization', request.headers.get('Authorization', ''))), 'Content-Type': 'big-query/csv', } + try: response = client().post( url=current_app.config['AUTHOR_AFFILIATION_SOLRQUERY_URL'],