Restore token auth for cross-origin access

This commit is contained in:
lpf
2026-03-16 17:34:09 +08:00
parent 2bef01f820
commit 5a6a455f43
2 changed files with 5 additions and 2 deletions

View File

@@ -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)