Skip to content

Commit

Permalink
fix: ignore case-sensitivity when matching AUTHENTICATED_USER_HEADER_…
Browse files Browse the repository at this point in the history
…KEY config value (#92)
  • Loading branch information
rahmatrhd authored Dec 13, 2021
1 parent 189ac12 commit dcb8ee5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ func grpcHandlerFunc(grpcServer *grpc.Server, otherHandler http.Handler) http.Ha

func makeHeaderMatcher(c *Config) func(key string) (string, bool) {
return func(key string) (string, bool) {
switch key {
case c.AuthenticatedUserHeaderKey:
switch strings.ToLower(key) {
case strings.ToLower(c.AuthenticatedUserHeaderKey):
return key, true
default:
return runtime.DefaultHeaderMatcher(key)
Expand Down

0 comments on commit dcb8ee5

Please sign in to comment.