From a8cffd56bd31a5164d9dd2b098ef887369288569 Mon Sep 17 00:00:00 2001 From: becivells <732903873@qq.com> Date: Tue, 1 Mar 2022 12:22:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=93=8D=E5=BA=94=E5=A4=B4?= =?UTF-8?q?=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/reverse/response.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/reverse/response.go b/internal/reverse/response.go index 256ef82..e1e6bfe 100644 --- a/internal/reverse/response.go +++ b/internal/reverse/response.go @@ -26,6 +26,14 @@ func (reverse *Reverse) ModifyResponse(shost string) func(response *http.Respons response.Header.Del("X-XSS-Protection") //https://stackoverflow.com/questions/27358966/how-to-set-x-frame-options-on-iframe response.Header.Del("X-Frame-Options") + + response.Header.Del("Content-Security-Policy-Report-Only") + + // 删除缓存策略 + response.Header.Del("Expires") + response.Header.Del("Last-Modified") + response.Header.Del("Date") + if response.Header.Get("Access-Control-Allow-Origin") != "" { //https://stackoverflow.com/questions/1653308/access-control-allow-origin-multiple-origin-domains if response.Request.Header.Get("Origin") != "" {