anandslab/docker-traefik

middlewares-https-redirectscheme is missing from middlewares.yml.example in 2.5 update

tehniemer opened this issue · 6 comments

The middleware for the new redirect scheme in 2.5 is missing from the example.

yes I noticed that too. An entry is needed in the middlewares.yml file. Without out you'll get errors like

time="2021-10-04T13:45:50Z" level=error msg="middleware \"middlewares-https-redirectscheme@file\" does not exist" entryPointName=https routerName=dozzle-rtr@docker

This worked for me.

    middlewares-https-redirectscheme:
      redirectScheme:
        scheme: https
        permanent: true

thanks for sharing, that worked for me!

For TOML Version of the file middlewares add:

  [http.middlewares.middlewares-https-redirectscheme]
    [http.middlewares.middlewares-https-redirectscheme.redirectScheme]
      scheme = "https"
      permanent = true

Works for me. :)

Confirmed this fix to middlewares.yml worked for my environment.