How to perform a https to http redirect with traefik 2

Viewed 147

I would like to setup a redirection from https to http with traefik 2 and docker, I tried with a configuration like this but this doesn't work.

Middleware:

      - "traefik.http.middlewares.redirect-to-http.redirectscheme.scheme=http"
      - "traefik.http.middlewares.redirect-to-http.redirectscheme.permanent=true"

Container:

      - "traefik.enable=true"
      - "traefik.http.routers.x-tls.entrypoints=websecure"
      - "traefik.http.routers.x-tls.rule=Host(`{{ spacefill_services_api_virtualhost }}`)"
      - "traefik.http.routers.x-tls.middlewares=redirect-to-http@docker"
      - "traefik.http.routers.x.entrypoints=web"
      - "traefik.http.routers.x.rule=Host(`{{ spacefill_services_api_virtualhost }}`)"
      - "traefik.http.services.x.loadbalancer.server.port=5000"

Can someone help me to find how to do this ?

0 Answers
Related