Skip to content

Commit

Permalink
Support empty auth parameters in go-synthetic
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSpiritXIII committed Oct 25, 2023
1 parent 1d8832a commit 42209ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/instrumentation/go-synthetic/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func authorizationHandler(handler http.Handler, scheme, parameters string) http.
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
auth := r.Header.Get("Authorization")
expected := scheme + " " + parameters
if auth == expected {
if strings.TrimSpace(auth) == strings.TrimSpace(expected) {
handler.ServeHTTP(w, r)
return
}
Expand Down

0 comments on commit 42209ef

Please sign in to comment.