Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed default for CONF_API_KEY_HEADER_NAME to "Authorization"
- Loading branch information
Changed default for CONF_API_KEY_HEADER_NAME to "Authorization"
2860792
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! I was the author of #31, thanks for merging that. However, I think that this commit introduces some potential confusion. The idea of the
CONF_API_KEY_HEADER_NAME
is to provide the name of the header to look for to optionally override the value"Authorization"
(some APIs require an alternative header name for the API key, e.g., WMATA wants"api_key"
per #30). With this commit, it will now look for the header "Authorization" to contain that header name:With the PR (before this commit), the relevant headers would be:
or with the default behavior:
After this commit, the relevant headers would be:
(the default behavior is the same as above)
I think that using the same key
"Authorization"
to mean either the API key value or the custom header name could be confusing. If you understood all this and disagree, then fair enough, I won't argue -- it is your repository after all! Also, I will note that the PR was written a little while ago, so if I'm misremembering something and this change was needed then sorry! Either way, thanks for creating and maintaining this project.2860792
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.