Remove useragent set by RC (#3167)

Fix #3166
This commit is contained in:
Laurence Jones 2024-08-12 09:34:45 +01:00 committed by GitHub
parent 52995b8fa4
commit 71a253aea6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -331,8 +331,9 @@ func NewParsedRequestFromRequest(r *http.Request, logger *log.Entry) (ParsedRequ
originalHTTPRequest.Header.Set("User-Agent", userAgent)
r.Header.Set("User-Agent", userAgent) //Override the UA in the original request, as this is what will be used by the waf engine
} else {
//If we don't have a forwarded UA, delete the one that was set by the bouncer
//If we don't have a forwarded UA, delete the one that was set by the remediation in both original and incoming
originalHTTPRequest.Header.Del("User-Agent")
r.Header.Del("User-Agent")
}
parsedURL, err := url.Parse(clientURI)