Word "events" is not available in path
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
627197438a
commit
a6dde44d56
|
@ -21,7 +21,6 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gomodule/redigo/redis"
|
"github.com/gomodule/redigo/redis"
|
||||||
|
@ -64,7 +63,7 @@ func WithAuth(handler http.Handler, b *memoryBackend) http.Handler {
|
||||||
|
|
||||||
authorization := ""
|
authorization := ""
|
||||||
|
|
||||||
if r.Method == http.MethodGet && strings.Contains(r.URL.Path, "events") {
|
if r.Method == http.MethodGet && r.URL.Query().Get("action") == "events" {
|
||||||
authorization = "Bearer " + r.URL.Query().Get("access_token")
|
authorization = "Bearer " + r.URL.Query().Get("access_token")
|
||||||
} else {
|
} else {
|
||||||
authorization = r.Header.Get("Authorization")
|
authorization = r.Header.Get("Authorization")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user