chore(lint): remove canonicalheader since it's not reliable
This commit is contained in:
@@ -29,7 +29,6 @@ linters:
|
|||||||
- asciicheck
|
- asciicheck
|
||||||
- bidichk
|
- bidichk
|
||||||
- bodyclose
|
- bodyclose
|
||||||
- canonicalheader
|
|
||||||
- containedctx
|
- containedctx
|
||||||
- copyloopvar
|
- copyloopvar
|
||||||
- decorder
|
- decorder
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ func (a *apiKeyMethod) equal(other authorizationChecker) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (a *apiKeyMethod) isAuthorized(_ http.Header, request *http.Request) bool {
|
func (a *apiKeyMethod) isAuthorized(_ http.Header, request *http.Request) bool {
|
||||||
xAPIKey := request.Header.Get("X-API-Key") //nolint:canonicalheader
|
xAPIKey := request.Header.Get("X-API-Key")
|
||||||
if xAPIKey == "" {
|
if xAPIKey == "" {
|
||||||
xAPIKey = request.URL.Query().Get("api_key")
|
xAPIKey = request.URL.Query().Get("api_key")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user