You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to RFC7239, the Forwarded header can have a comma-separated list of values. It is used to indicate the string of proxies (including the client that initiated the request).
The ForwardedParser class splits this header by comma and later considers only the first element. This element will be the one that will determine each property of the request (protocol, host, etc). This is not the expected behavior as it will discard the remaining information in the header, as you will see in the next sections.
Expected behavior
When a client does a HTTP request with the following header, Forwarded: by=proxy;for=backend:4444,for=backend2:5555;host=somehost;proto=https, the quarkus server must consider host and proto properties defined by the header.
Actual behavior
The properties host and proto are not considered, and eventually discarded.
Describe the bug
According to RFC7239, the
Forwarded
header can have a comma-separated list of values. It is used to indicate the string of proxies (including the client that initiated the request).The ForwardedParser class splits this header by comma and later considers only the first element. This element will be the one that will determine each property of the request (protocol, host, etc). This is not the expected behavior as it will discard the remaining information in the header, as you will see in the next sections.
Expected behavior
When a client does a HTTP request with the following header,
Forwarded: by=proxy;for=backend:4444,for=backend2:5555;host=somehost;proto=https
, the quarkus server must considerhost
andproto
properties defined by the header.Actual behavior
The properties
host
andproto
are not considered, and eventually discarded.How to Reproduce?
Output of
uname -a
orver
Darwin dibss-MacBook-Pro.local 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64 x86_64
Output of
java -version
openjdk version "11.0.15" 2022-04-19 OpenJDK Runtime Environment Temurin-11.0.15+10 (build 11.0.15+10) OpenJDK 64-Bit Server VM Temurin-11.0.15+10 (build 11.0.15+10, mixed mode)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Additional information
No response
The text was updated successfully, but these errors were encountered: