Skip to content

Instantly share code, notes, and snippets.

@korchasa
Last active November 14, 2019 09:48
Show Gist options
  • Save korchasa/69ec668507a5e7f1d92e04d71ec08cf9 to your computer and use it in GitHub Desktop.
Save korchasa/69ec668507a5e7f1d92e04d71ec08cf9 to your computer and use it in GitHub Desktop.
Traefik example
[entryPoints]
[entryPoints.web]
address = ":8888"
[providers]
[providers.file]
filename = "traefik_conf.toml"
watch = true
[log]
level = "DEBUG"
[accessLog]
[metrics]
[metrics.prometheus]
[api]
dashboard = true
insecure = true
[ping]
entryPoint = "ping"
[http]
[http.routers]
[http.routers.dash]
rule = "PathPrefix(`/api`) || PathPrefix(`/dashboard`)"
service = "api@internal"
[http.routers.httbin-org]
rule = "PathPrefix(`/proxy`)"
middlewares = ["remove-proxy-from-path", "rate-limit-5", "retry-4"]
service = "httpbin-org"
[http.middlewares]
[http.middlewares.remove-proxy-from-path.replacePathRegex]
regex = "^/proxy/(.*)"
replacement = "/$1"
[http.middlewares.rate-limit-5.rateLimit]
average = 5
[http.middlewares.retry-4.retry]
attempts = 4
[http.services]
[http.services.httpbin-org.loadBalancer]
[[http.services.httpbin-org.loadBalancer.servers]]
url = "http://httpbin.org/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment