Skip to content

Commit

Permalink
Merge pull request #1593 from openshift-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…1590-to-release-0.6

[release-0.6] Don't add /clusters/ prefix to /services/ requests
  • Loading branch information
openshift-merge-robot authored Jul 21, 2022
2 parents fe430c8 + 29d24f4 commit 02739c5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/server/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,11 @@ func WithInClusterServiceAccountRequestRewrite(handler http.Handler) http.Handle
return
}

if strings.HasPrefix(req.RequestURI, "/services/") {
handler.ServeHTTP(w, req)
return
}

prefix := "Bearer "
token := req.Header.Get("Authorization")
if !strings.HasPrefix(token, prefix) {
Expand Down

0 comments on commit 02739c5

Please sign in to comment.