Hello! I have a scenario I can not figure out in Traefik.
I have a website example.com, with a public IP of 1.2.3.4.
The issue is that our client is scanning our website with a security scanner (vendor security program), and are entering 1.2.3.4 as the url, and getting the default traefik 404 page not found. The cert on the 404 page is the traefik default, and thus is flagged by the security scanner by not being a proper certificate.
I need to find if the request is coming in as 1.2.3.4, and redirect to example.com, or forward it to a custom 404 page that is behind our valid SSL cert. I am working with variations of the sample below, but none seem to be working, and keep hitting the [404 page not found] page behind the default traefik cert.
ip-catchall:
entryPoints:
- "https"
rule: "Host(1.2.3.4
) || Host(https://1.2.3.5
)"
middlewares:
- ip-redirect
service: ip-catchall
middlewares:
ip-redirect:
redirectRegex:
regex: "^https?://(.*)`"
replacement: "https://www.example.com"
permanent: true
Thanks,