Change way to find the token
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
4c16fda022
commit
627197438a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user