Skip to content

Commit

Permalink
chore(lint): remove canonicalheader since it's not reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Nov 5, 2024
1 parent 69aafa5 commit 88fd938
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ linters:
- asciicheck
- bidichk
- bodyclose
- canonicalheader
- containedctx
- copyloopvar
- decorder
Expand Down
2 changes: 1 addition & 1 deletion internal/server/middlewares/auth/apikey.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (a *apiKeyMethod) equal(other authorizationChecker) 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 == "" {
xAPIKey = request.URL.Query().Get("api_key")
}
Expand Down

0 comments on commit 88fd938

Please sign in to comment.