Mixing http and https ( tls) in one router

Hi everyone

There is way to mix http and https(tls) in one router ?

Thanks

Hello @achraf,

If you want Traefik to operate at layer 7, then you need to have a TLS router and a non-TLS router: (Routers - Traefik)

If you want Traefik to operate at layer 4, you can create a TCP router that will forwards TCP traffic, which will contain HTTP and HTTPS traffic: (Routers - Traefik)

Is there a reason that you would want to mix http and https traffic in one router?

Hello @daniel

Thanks for your quick reply :slight_smile:

I have multiple routers and each router must serve http
and https request .
In my case I create two router foreach host : one with http and another one with https ( with tls) .

And it become too difficult to maintaine a duplicate router for the same host ( http and https )

Hello @achraf,

If you are only using http to redirect to https, you may want to look at using an entrypoint redirect so that you only have to deal with the https routers.

Otherwise your only option for the time being is to use multiple routers.

1 Like

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