mirror of
https://github.com/floci-io/floci.git
synced 2026-11-25 23:00:59 -05:00
S3VirtualHostFilter was reading config via ConfigProvider at construction time, always deriving baseHostname from floci.base-url. When running inside Docker, Lambda containers resolve S3 via the embedded DNS suffix (e.g. bucket.floci:4566), not the external base-url hostname. The filter never matched those virtual-host headers, so S3 requests from Lambda containers were served as path-style misses. Switch to CDI injection (EmulatorConfig + ContainerDetector) so that in Docker mode baseHostname is set to EmbeddedDnsServer.DEFAULT_SUFFIX (or FLOCI_HOSTNAME when configured), consistent with what the embedded DNS actually resolves. Add @Startup to EmbeddedDnsServer for eager initialisation and export DEFAULT_SUFFIX as a shared constant. Add LambdaDnsResolutionTest to validate the full path: Lambda container → embedded DNS → virtual-host filter → S3 object.