Skip to content

Remove transparent proxy note from the doc #129

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

Merged
merged 1 commit into from
Jul 11, 2025
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
12 changes: 6 additions & 6 deletions src/main/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,19 @@ End-to-end headers are forwarded by the proxy, hop-by-hop headers are ignored.

==== Request authority

As a transparent proxy, the request authority (`Host` header for HTTP/1.1, `:authority` pseudo header for HTTP/2) is preserved.
By default, the proxy request authority (`Host` header for HTTP/1.1, `:authority` pseudo header for HTTP/2) is set by the HTTP client according to the origin server address.

You can override the request authority
CAUTION: The origin server may need you to set the https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-Host[`x-forwarded-*`] or https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Forwarded[`forwarded`] headers on the proxied request.
For example, it might use the values to compute a created HTTP resource https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Location[location].

Nevertheless, you can override the request authority:

[source,java]
----
{@link examples.HttpProxyExamples#overrideAuthority}
----

When the request authority is overridden, the `x-forwarded-host` header is set on the request to the origin server with the original authority value.

WARNING: changing the request authority can have undesirable side effects and can affect the proxied web server that might
rely on the original request authority to handle cookies, URL redirects and such.
When the request authority is overridden, the `x-forwarded-host` header is automatically set on the request to the origin server with the original authority value.

=== WebSockets

Expand Down