Skip to content

Commit

Permalink
Quarkus 3.17.0 does not include local port in
Browse files Browse the repository at this point in the history
io.vertx.core.http.HttpServerRequest.absoluteURI() if X-Forwarded-Host
is set - see quarkusio/quarkus#44777
  • Loading branch information
ppalaga committed Jan 22, 2025
1 parent 8716684 commit 06815ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void xForwardedPort() {
void xForwardedHost() {
Assertions.assertThat(
getRequestFieldValue(X_FORWARDED_HOST_HEADER, "foo", "getRequestURL"))
.isEqualTo("http://foo:8081/services/hello");
.isEqualTo("http://foo/services/hello");
Assertions.assertThat(
getRequestFieldValue(X_FORWARDED_HOST_HEADER, "foo", "getServerName"))
.isEqualTo("foo");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void testXForwardedHostHeader() {
Matchers.hasXPath(
anyNs("definitions", "service", "port", "address") + "/@*[local-name() = 'location']",
CoreMatchers.is(
"http://api.example.com:8081/soap/greeting")));
"http://api.example.com/soap/greeting")));
}

@Test
Expand Down Expand Up @@ -159,7 +159,7 @@ void testXForwardedHeadersParrallel() throws ExecutionException, InterruptedExce

for (Response response : responses) {
response.then().body(CoreMatchers.anyOf(
containsString("http://api1.example.com:8081/soap/greeting"),
containsString("http://api1.example.com/soap/greeting"),
containsString("http://localhost:443/soap/greeting"),
containsString("http://localhost:8081/test/soap/greeting"),
containsString("https://localhost:8280/soap/greeting")));
Expand Down

0 comments on commit 06815ee

Please sign in to comment.