fix srcset handler in html rewriter

This commit is contained in:
Kevin Pham
2023-11-27 21:36:50 -06:00
parent 78e15d8342
commit 0fe02c397d
8 changed files with 59 additions and 33 deletions

View File

@@ -19,11 +19,12 @@ func init() {
"x-forwarded-for": true,
"x-real-ip": true,
"forwarded": true,
"accept-encoding": true,
}
}
// ForwardRequestHeaders forwards the requests headers sent from the client to the upstream server
func ForwardRequestHeaders(ua string) proxychain.RequestModification {
func ForwardRequestHeaders() proxychain.RequestModification {
return func(chain *proxychain.ProxyChain) error {
forwardHeaders := func(key, value []byte) {
@@ -32,6 +33,7 @@ func ForwardRequestHeaders(ua string) proxychain.RequestModification {
if forwardBlacklist[k] {
return
}
//fmt.Println(k, v)
chain.Request.Header.Set(k, v)
}