mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-02-12 16:12:44 +00:00
fix add global rewrite rules to requests without mitm session
Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
@@ -493,6 +493,11 @@ func (m *ProxyHandler) prepareRequestWithoutSession(req *http.Request, reqCtx *R
|
||||
}
|
||||
}
|
||||
|
||||
// append global rewrite rules to host config for requests without session
|
||||
if reqCtx.ProxyConfig != nil && reqCtx.ProxyConfig.Global != nil && reqCtx.ProxyConfig.Global.Rewrite != nil {
|
||||
hostConfig.Rewrite = append(hostConfig.Rewrite, reqCtx.ProxyConfig.Global.Rewrite...)
|
||||
}
|
||||
|
||||
// apply header rewrite rules (no capture)
|
||||
if hostConfig.Rewrite != nil {
|
||||
for _, replacement := range hostConfig.Rewrite {
|
||||
|
||||
Reference in New Issue
Block a user