mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-04-15 06:17:28 +08:00
Restore token auth for cross-origin access
This commit is contained in:
@@ -31,8 +31,8 @@ func TestCheckAuthAllowsBearerAndCookieOnly(t *testing.T) {
|
||||
}
|
||||
|
||||
queryReq := httptest.NewRequest(http.MethodGet, "/?token=secret-token", nil)
|
||||
if srv.checkAuth(queryReq) {
|
||||
t.Fatalf("expected query token auth to fail")
|
||||
if !srv.checkAuth(queryReq) {
|
||||
t.Fatalf("expected query token auth to succeed")
|
||||
}
|
||||
|
||||
refererReq := httptest.NewRequest(http.MethodGet, "/", nil)
|
||||
|
||||
Reference in New Issue
Block a user