diff --git a/cmd/eksterd/main.go b/cmd/eksterd/main.go index 51e47b5..7c024f5 100644 --- a/cmd/eksterd/main.go +++ b/cmd/eksterd/main.go @@ -62,9 +62,12 @@ func WithAuth(handler http.Handler, b *memoryBackend) http.Handler { return } - authorization := r.Header.Get("Authorization") - if authorization == "" && strings.Contains(r.URL.Path, "events") { + authorization := "" + + if r.Method == http.MethodGet && strings.Contains(r.URL.Path, "events") { authorization = "Bearer " + r.URL.Query().Get("access_token") + } else { + authorization = r.Header.Get("Authorization") } var token auth.TokenResponse