Hello,
I'm using taefik v2 with docker-compose and i was wondering:
I have a server with a fqdn with a valid SSL certificate for that domain. But it seem possible to access to my server directely with the external IP address and it expose a self-signed certificate.
How can i redirect traffic coming on my ip interface to the fqdn?
I have already try something like this:
- "traefik.http.routers.http-metrics.middlewares=redirect"
- "traefik.http.middlewares.redirect.redirectregex.regex=^https://45.56.25.111/(.*)"
- "traefik.http.middlewares.redirect.redirectregex.replacement=https://mydomain.com/$${1}"
- "traefik.http.middlewares.redirect.redirectregex.permanent=true"
without success..
Any idea?