Difficulties with HTTPS using two instances of Traefik

Hello

I wanted to know if anyone has some advice on how to handle HTTPS when chaining two traffic instances together. The first instance has public access, while the second is on an internal network. I've been trying to forward HTTPS to the second instance, but the Proxy headers for HTTPS do not reach the services in the second instances, so any redirects thrown there are thrown into HTTP, which breaks under browser usage.

I wondered what was the recommended way to route a hostname from one instance to the second one while keeping these headers for internal services to be able to behave properly.

If this is too difficult, at lease some way to rewrite redirects to use HTTPS would be appreciated.

You could forward/proxy requests to the second instance with https. Or just set the schema header in the second Traefik instance (doc):

X-Forwarded-Proto: https

I see now, thanks for the suggestion. I do have however, multiple routers and I wonder if there is a way to apply this setting in general to all the routers by default, or if the only option is to individually add the headers

You can set middleware globally on entrypoint (doc).

Very much appreciated, will check this out, thank you so much for the advice!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.