fix "modifer" -> "modifier" typo everywhere
This commit is contained in:
24
proxychain/requestmodifiers/spoof_origin.go
Normal file
24
proxychain/requestmodifiers/spoof_origin.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package requestmodifiers
|
||||
|
||||
import (
|
||||
"ladder/proxychain"
|
||||
)
|
||||
|
||||
// SpoofOrigin modifies the origin header
|
||||
// if the upstream server returns a Vary header
|
||||
// it means you might get a different response if you change this
|
||||
func SpoofOrigin(url string) proxychain.RequestModification {
|
||||
return func(px *proxychain.ProxyChain) error {
|
||||
px.Request.Header.Set("origin", url)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// HideOrigin modifies the origin header
|
||||
// so that it is the original origin, not the proxy
|
||||
func HideOrigin() proxychain.RequestModification {
|
||||
return func(px *proxychain.ProxyChain) error {
|
||||
px.Request.Header.Set("origin", px.Request.URL.String())
|
||||
return nil
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user