Skip to content

Commit

Permalink
Made the service configurable; to serve with service token
Browse files Browse the repository at this point in the history
  • Loading branch information
romanchyla committed Jun 2, 2020
1 parent 6f4aa5d commit 69bfa82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion authoraffsrv/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down

0 comments on commit 69bfa82

Please sign in to comment.