mirror of
https://github.com/bettercap/bettercap
synced 2025-08-22 06:23:18 -07:00
Remove Content-Length from response header
If the pre-stripped response has a content-length header, the returned response will forward the original content-length and that will results in an incorrect response.
This commit is contained in:
parent
bb1f6cd0e8
commit
29656cdf25
1 changed files with 1 additions and 0 deletions
|
@ -296,6 +296,7 @@ func (s *SSLStripper) fixResponseHeaders(res *http.Response) {
|
||||||
res.Header.Del("X-Download-Options")
|
res.Header.Del("X-Download-Options")
|
||||||
res.Header.Del("X-Permitted-Cross-Domain-Policies")
|
res.Header.Del("X-Permitted-Cross-Domain-Policies")
|
||||||
res.Header.Del("X-Xss-Protection")
|
res.Header.Del("X-Xss-Protection")
|
||||||
|
res.Header.Del("Content-Length")
|
||||||
res.Header.Set("Allow-Access-From-Same-Origin", "*")
|
res.Header.Set("Allow-Access-From-Same-Origin", "*")
|
||||||
res.Header.Set("Access-Control-Allow-Origin", "*")
|
res.Header.Set("Access-Control-Allow-Origin", "*")
|
||||||
res.Header.Set("Access-Control-Allow-Methods", "*")
|
res.Header.Set("Access-Control-Allow-Methods", "*")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue