Skip to content

Commit 6872ada

Browse files
authored
make word "bearer" in http auth header case insensitive (#1963)
Signed-off-by: Kent Rancourt <kent.rancourt@microsoft.com>
1 parent 8ca05f7 commit 6872ada

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

v2/apiserver/internal/api/rest/token_auth_filter.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ func (t *tokenAuthFilter) Decorate(handle http.HandlerFunc) http.HandlerFunc {
111111
" ",
112112
2,
113113
)
114-
if len(headerValueParts) != 2 || headerValueParts[0] != "Bearer" {
114+
if len(headerValueParts) != 2 ||
115+
strings.ToLower(headerValueParts[0]) != "bearer" {
115116
t.writeResponse(
116117
w,
117118
http.StatusUnauthorized,

0 commit comments

Comments
 (0)