From 42209ef96eba18423a84283f5e241036d3cefd89 Mon Sep 17 00:00:00 2001 From: Daniel Hrabovcak Date: Wed, 25 Oct 2023 08:39:14 -0400 Subject: [PATCH] Support empty auth parameters in go-synthetic --- examples/instrumentation/go-synthetic/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/instrumentation/go-synthetic/auth.go b/examples/instrumentation/go-synthetic/auth.go index b26dced1c6..14e4d893bf 100644 --- a/examples/instrumentation/go-synthetic/auth.go +++ b/examples/instrumentation/go-synthetic/auth.go @@ -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 }