mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-04-14 18:17:29 +08:00
Allow credentialed cross-origin API requests
This commit is contained in:
@@ -193,6 +193,9 @@ func TestWithCORSEchoesPreflightHeaders(t *testing.T) {
|
||||
if got := rec.Header().Get("Access-Control-Allow-Origin"); got != "https://dash.clawgo.dev" {
|
||||
t.Fatalf("unexpected allow origin: %q", got)
|
||||
}
|
||||
if got := rec.Header().Get("Access-Control-Allow-Credentials"); got != "true" {
|
||||
t.Fatalf("unexpected allow credentials: %q", got)
|
||||
}
|
||||
if got := rec.Header().Get("Access-Control-Allow-Methods"); got != "POST" {
|
||||
t.Fatalf("unexpected allow methods: %q", got)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user