fix baidu

This commit is contained in:
King committed 2026-07-29 14:07:59 +08:00
1 parent eca3a1dee9
commit 85922d5c2e
3 files changed
+29 -4

No files matched your search

+1
View File
@@ -28,4 +28,5 @@ func writeDynamicRedirectHeaders(header http.Header) {
header.Set("Cache-Control", "no-store, no-cache, must-revalidate, max-age=0")
header.Set("Pragma", "no-cache")
header.Set("Expires", "0")
header.Set("Referrer-Policy", "no-referrer")
}
+4 -3
View File
@@ -111,9 +111,10 @@ func assertDynamicRedirect(t *testing.T, response *http.Response) {
t.Fatalf("Location = %q", got)
}
wantHeaders := map[string]string{
"Cache-Control": "no-store, no-cache, must-revalidate, max-age=0",
"Pragma": "no-cache",
"Expires": "0",
"Cache-Control": "no-store, no-cache, must-revalidate, max-age=0",
"Pragma": "no-cache",
"Expires": "0",
"Referrer-Policy": "no-referrer",
}
for name, want := range wantHeaders {
if got := response.Header.Get(name); got != want {