Skip to content

Instantly share code, notes, and snippets.

@wmnnd
Created March 11, 2020 00:05
Show Gist options
  • Save wmnnd/0805da991c612f5485b591567fd96b26 to your computer and use it in GitHub Desktop.
Save wmnnd/0805da991c612f5485b591567fd96b26 to your computer and use it in GitHub Desktop.
Traefik configuration for an HTTPS redirect middleware/router
[http.routers]
[http.routers.force-https]
entryPoints = ["http"]
middlewares = ["force-https"]
rule = "HostRegexp(`{any:.+}`)"
service = "noop"
[http.middlewares]
[http.middlewares.force-https.redirectScheme]
scheme = "https"
[http.services]
[http.services.noop.loadBalancer]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment