Hello everyone,
I am trying to deploy a sort of "catch-all" container for requests with an unknown Host header (Or rather, host header of a domain, for which I don't yet have a matching container)
E.g.:
I have a container for foo.example.com and bar.example.com.
But if a request comes for bas.example.com, I'd like it to be routed to a sort-of default container.
The goal is to stop enumeration attacks by replying with a (seemingly) identical HTTP page, even for subdomains I did not configure yet.
I tried achieving that by the following router rules:
Host(`*`)
Host(`*.example.com`)
HostRegexp(`^.+\.example\.com`)
None of them result in the request being routed into the correct container.
Furthermore, having enabled Traefik's access log, I can see that requests for domains I have previously explicitly defined contain both, the Frontend name and Backend IP the request was routed to.
But neither of those are defined for requests that should be handled by the catchall container (Both are "-"), and as there's no container to handle the requests, a 404 is returned.
Other domains (For containers with router rules like Host(foo.example.com
)) work fine.
Using Traefik v2.10, as an ingress for Docker provider.
Any tips on how to further debug the issue would be very appreciated!