Skip to content

Commit

Permalink
移除响应头缓存
Browse files Browse the repository at this point in the history
  • Loading branch information
Becivells authored Mar 1, 2022
1 parent b5ed82c commit a8cffd5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/reverse/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -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") != "" {
Expand Down

0 comments on commit a8cffd5

Please sign in to comment.