Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
Merge f442f5b into 1093312
Browse files Browse the repository at this point in the history
  • Loading branch information
pmac committed Dec 3, 2015
2 parents 1093312 + f442f5b commit 043b27f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions news/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ def has_valid_api_key(request):
# The API key could be the query parameter 'api-key' or the
# request header 'X-api-key'.

api_key = request.REQUEST.get('api-key', None) or\
request.META.get('HTTP_X_API_KEY', None)
api_key = (request.REQUEST.get('api-key', None) or
request.REQUEST.get('api_key', None) or
request.META.get('HTTP_X_API_KEY', None))
return APIUser.is_valid(api_key)


Expand Down

0 comments on commit 043b27f

Please sign in to comment.