Skip to content

Commit

Permalink
swagger3
Browse files Browse the repository at this point in the history
  • Loading branch information
charlie-de-muis committed Jan 7, 2025
1 parent d311027 commit 966a32e
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 58 deletions.
2 changes: 1 addition & 1 deletion CargoHub/CARGOHUB/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
'SECURITY_DEFINITIONS': {
'apiKeyAuth': {
'type': 'apiKey',
'name': 'API-KEY', # The header name where the token is passed
'name': 'API_KEY_ADMIN', # The header name where the token is passed
'in': 'header' # Indicates the token is passed in the request header
}
},
Expand Down
2 changes: 1 addition & 1 deletion CargoHub/api_app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_api_key(self, request):
"""
Retrieve the API key from request headers.
"""
return request.headers.get("API-KEY")
return request.headers.get("API_KEY_ADMIN")

def validate_api_key(self, request):
"""
Expand Down
Loading

0 comments on commit 966a32e

Please sign in to comment.