From 54386b4179086e776ea21f127762b1d5863c319e Mon Sep 17 00:00:00 2001 From: leeturner Date: Mon, 1 Jul 2024 11:01:57 +0100 Subject: [PATCH] Add the new --preserve-user-agent-proxy-header config options --- _docs/configuration.md | 3 +++ _docs/standalone/java-jar.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/_docs/configuration.md b/_docs/configuration.md index 8ca7975c..7258958d 100644 --- a/_docs/configuration.md +++ b/_docs/configuration.md @@ -125,6 +125,9 @@ HTTP/2 can be disabled separately for plain text (HTTP) and TLS (HTTPS): // Send the Host header in the original request onwards to the system being proxied to .preserveHostHeader(false) + +// As of WireMock `3.7.0`, when in proxy mode, this option will transfer the original `User-Agent` header from the client to the proxied service. +.preserveUserAgentProxyHeader(true) // Override the Host header sent when reverse proxying to another system (this and the previous parameter are mutually exclusive) .proxyHostHeader("my.otherdomain.com") diff --git a/_docs/standalone/java-jar.md b/_docs/standalone/java-jar.md index 06400eac..655be155 100644 --- a/_docs/standalone/java-jar.md +++ b/_docs/standalone/java-jar.md @@ -92,6 +92,9 @@ option is not present, the Host header value is deducted from the proxy URL. This option is only available if the `--proxy-all` option is specified. +`--preserve-user-agent-proxy-header`: As of WireMock `3.7.0`, when in proxy mode, this option will transfer the +original `User-Agent` header from the client to the proxied service. + `--proxy-via`: When proxying requests (either by using --proxy-all or by creating stub mappings that proxy to other hosts), route via another proxy server (useful when inside a corporate network that only permits