Skip to content

Instantly share code, notes, and snippets.

@thomasvt1
Created December 17, 2019 12:45
Show Gist options
  • Save thomasvt1/5e2d3f133fa69db17aba635b65705cb0 to your computer and use it in GitHub Desktop.
Save thomasvt1/5e2d3f133fa69db17aba635b65705cb0 to your computer and use it in GitHub Desktop.
dynamic.toml
# dynamic.toml
## dynamic configuration
[http.routers]
[http.routers.redirecttohttps]
entryPoints = ["web"]
middlewares = ["httpsredirect"]
rule = "HostRegexp(`{host:.+}`)"
service = "noop"
[http.services]
# noop service, the URL will be never called
[http.services.noop.loadBalancer]
[[http.services.noop.loadBalancer.servers]]
url = "http://192.168.0.1"
[http.middlewares]
[http.middlewares.httpsredirect.redirectScheme]
scheme = "https"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment