Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/traefik/traefik/llms.txt

Use this file to discover all available pages before exploring further.

HTTP Middlewares

Controlling connections

Configuration Example

# As a Docker Label
whoami:
  # A container that exposes an API to show its IP address
  image: traefik/whoami
  labels:
    # Create a middleware named `foo-add-prefix`
    - "traefik.http.middlewares.foo-add-prefix.addprefix.prefix=/foo"
    # Apply the middleware named `foo-add-prefix` to the router named `router1`
    - "traefik.http.routers.router1.middlewares=foo-add-prefix@docker"

Available HTTP Middlewares

MiddlewarePurposeArea
AuthenticationBasicAuth, DigestAuth, ForwardAuthSecurity, Authentication
HeadersAdds/Updates headersSecurity
RateLimitLimits call frequencySecurity, Request lifecycle
RedirectSchemeRedirects based on schemeRequest lifecycle
StripPrefixRemoves path prefixesPath Modifier
CompressCompresses responsesContent Modifier
CircuitBreakerPrevents calling unhealthy servicesRequest Lifecycle

Community Middlewares

Please take a look at the community-contributed plugins in the plugin catalog.