fix(config): accept any Host header again after the Quarkus 3.39 upgrade (#3222)

* fix(config): accept any Host header again after the Quarkus 3.39 upgrade

Quarkus 3.38 added a Host-header validation filter (HostValidationFilter) that answers an
empty HTTP 400 to any request whose Host is not localhost, before the request reaches the
application. #3175 moved Floci from 3.37.4 to 3.39.2, so since then every client that does
not address the emulator as localhost is rejected: a compose service name (FLOCI_HOSTNAME=floci,
which the compatibility suites use), localhost.floci.io, and the virtual-host style S3 names.
Even /_floci/health answers 400 with Host: floci:4566, and nothing is logged.

quarkus.http.host-validation.require-localhost is now false. The filter only runs in the prod
profile, so a QuarkusTest cannot pin this; the sdk-test-java compatibility suite, which talks
to http://floci:4566 from another container, is the guard (1,061 errors before, green after).

* docs(config): say why host validation is disabled rather than allow-listed

The Quarkus 3.38+ Host-header filter is an exact-match set that Quarkus enables by itself
when the server is bound to loopback, which Floci does in TLS mode behind its TCP proxy on
4566; with require-localhost it admits only localhost, 127.0.0.1 and [::1]. The names the
emulator must answer under are wildcards from its own certificate and whatever a compose
file calls the service, which an exact-match allow-list cannot express. The comment now
states that, and that disabling the check restores the behaviour of every release before
Quarkus 3.39 and of the non-TLS mode, where Quarkus never enables it.
This commit is contained in:
Hector Ventura authored and GitHub committed 2026-09-07 23:29:22 -05:00
1 parent 4944764fa3
commit 1f4d43c4cc
1 file changed
+13
+13
View File
@@ -13,6 +13,19 @@ quarkus:
http:
port: ${floci.port}
host: 0.0.0.0
# Quarkus 3.38 added a Host-header validation filter (DNS-rebinding protection for a dev server)
# that it switches on by itself whenever the server is bound to loopback, which Floci does in
# TLS mode: Quarkus listens on 127.0.0.1:4510/4511 behind the TCP proxy on 4566, and the proxy
# passes the client's Host header through untouched. The filter is an exact-match set with no
# wildcard support, and with require-localhost it admits only localhost, 127.0.0.1 and [::1].
# An emulator has to answer under the names it documents and puts in its certificate
# (localhost.floci.io, *.localhost.floci.io, *.execute-api.localhost.floci.io,
# host.docker.internal) and under whatever a compose file calls it (FLOCI_HOSTNAME), none of
# which an exact-match allow-list can express. Disabling the check restores the behaviour of
# every release before Quarkus 3.39 and of the non-TLS mode, where Quarkus never enables it;
# the access boundary of a local emulator is the IAM and signature enforcement configuration.
host-validation:
require-localhost: false
limits:
max-body-size: ${floci.protocols.max-request-size}M
datasource: