Skip to content

Commit

Permalink
cors 优化
Browse files Browse the repository at this point in the history
  • Loading branch information
Becivells committed Sep 16, 2021
1 parent af598ec commit e3900b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/reverse/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ func (reverse *Reverse) ModifyResponse(shost string) func(response *http.Respons
// Stop CSPs and anti-XSS headers from ruining our fun
response.Header.Del("Content-Security-Policy")
response.Header.Del("X-XSS-Protection")
if response.Header.Get("Access-Control-Allow-Origin") != "" {
response.Header.Set("Access-Control-Allow-Origin", "*")
}
response.Header.Add("GoblinServer", Version)
err := reverse.modifyLocationHeader(shost, response)
if err != nil {
Expand Down

0 comments on commit e3900b3

Please sign in to comment.