Traefik monitor to accept http and redirect to https?

Hi,

I wonder if anyone can help ?

I have traefik monitor setup with https and and auth middleware - all seems to be fine. Although i am forced to go to the https address, if i go to the http address it gives me 404.

I added a redirect but i must be doing something wrong ? These are all added with docker labels

labels:
  - "traefik.enable=true"
  - "traefik.http.routers.traefik.service=api@internal"
  - "traefik.http.routers.traefik.tls.certresolver=le"
  - "traefik.http.routers.traefik.entrypoints=web,websecure"
  - "traefik.http.routers.traefik.middlewares=traefik-auth,traefik-redirect"
  - "traefik.http.middlewares.traefik-redirect.redirectscheme.scheme=https"
  - "traefik.http.middlewares.traefik-redirect.redirectscheme.permanent=true"

starting traefik i pass the following

  "--entryPoints.web.address=:80",
  "--entryPoints.websecure.address=:443",

Anybody know whats going on ? Its obviously me but I am not sure what I am doing wrong.

Basically I want to ensure the https works ( and it does) and anybody trying to access http would be forced redirected to the https address.

Thanks in advance

Hello,

Recommend read:

Thank you, its now working.