fix baidu
This commit is contained in:
1 parent
eca3a1dee9
commit
85922d5c2e
3 files changed
+29
-4
No files matched your search
@@ -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")
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user