Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement: Remove useragent set by RC #3167

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/appsec/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,9 @@
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

Check warning on line 334 in pkg/appsec/request.go

View check run for this annotation

Codecov / codecov/patch

pkg/appsec/request.go#L334

Added line #L334 was not covered by tests
originalHTTPRequest.Header.Del("User-Agent")
r.Header.Del("User-Agent")

Check warning on line 336 in pkg/appsec/request.go

View check run for this annotation

Codecov / codecov/patch

pkg/appsec/request.go#L336

Added line #L336 was not covered by tests
}

parsedURL, err := url.Parse(clientURI)
Expand Down
Loading