Hello
We have set up a middleware in traefik that is working fine, with the next configuration:
[http.middlewares]
[http.middlewares.test-redirectscheme.redirectScheme]
scheme = "https"
port = 30443
permanent = true
I'm using Traefik v2.3 as a Reverse Proxy, TLS Offloading an applicattion called Dashmachine. The thing is that Dashmachine do some redirections using absolute redirection, so the https scheme and/or the port is overwritten by the application.
In Nginx i have fixed this issue using the next option:
absolute_redirect off;
Is it possible to do it easily with Traefik?
Thank you in advance.
Regards.
P.S: I attach my static and dynamic configuration files:
static.toml
defaultEntryPoints = ["https"]
[log]
level = "DEBUG"
[entryPoints]
[entryPoints.https]
address = ":443"
[providers]
[providers.file]
filename = "/etc/traefik/proxy-config.toml"
dynamic.toml
[http.routers]
[http.routers.reverse-proxy]
#rule = "PathPrefix(`/`)"
rule = "HostRegexp(`{any:.*}`)"
service = "backend"
entryPoints = ["https"]
middlewares = ["test-redirectscheme"]
[http.routers.reverse-proxy.tls]
options = "myTLSOptions"
[tls.options]
[tls.options.myTLSOptions]
minVersion = "VersionTLS12"
[tls.stores]
[tls.stores.default]
[tls.stores.default.defaultCertificate]
certFile = "/etc/certs/dashmachine.pem"
keyFile = "/etc/certs/dashmachine.key"
[http.middlewares]
[http.middlewares.test-redirectscheme.redirectScheme]
scheme = "https"
port = 30443
permanent = true
[http.services]
[http.services.backend.loadBalancer]
[[http.services.backend.loadBalancer.servers]]
url = "http://dashmachine:5000"