How to I redirect all http to https i.e. all traffic to http://example.com should get redirected to https://example.com.
My current nomad job tags look like this
tags = [
"traefik.enable=true",
"traefik.http.routers.app.rule=Host(`app.example.com`)",
"traefik.http.routers.app.entrypoints=http,https",
"traefik.http.routers.app.tls=true",
"traefik.http.routers.app.tls.certresolver=letsencrypt",
"traefik.http.routers.app.tls.domains[0].main=*.example.com",
"traefik.http.middlewares.test-redirectscheme.redirectscheme.scheme=https",
"traefik.http.middlewares.test-redirectscheme.redirectscheme.permanent=true"
]
I have added the last 2 tags for redirection but it is not working.