Type object
Schema URL https://catalog.lintel.tools/schemas/schemastore/traefik-v3-file-provider/latest.json
Source https://www.schemastore.org/traefik-v3-file-provider.json

Validate with Lintel

npx @lintel/lintel check
Type: object

Traefik v2 Dynamic Configuration File Provider

Properties

http object
3 nested properties
routers Record<string, object>
services Record<string, object>
middlewares Record<string, object>

Attached to the routers, pieces of middleware are a means of tweaking the requests before they are sent to your service (or before the answer from the services are sent to the clients).

There are several available middleware in Traefik, some can modify the request, the headers, some are in charge of redirections, some add authentication, and so on.

Pieces of middleware can be combined in chains to fit every scenario.

tcp object
2 nested properties
routers Record<string, object>
services Record<string, object>

Each of the fields of the service section represents a kind of service. Which means, that for each specified service, one of the fields, and only one, has to be enabled to define what kind of service is created. Currently, the two available kinds are LoadBalancer, and Weighted.

udp object
2 nested properties
routers Record<string, object>

Similarly to TCP, as UDP is the transport layer, there is no concept of a request, so there is no notion of an URL path prefix to match an incoming UDP packet with. Furthermore, as there is no good TLS support at the moment for multiple hosts, there is no Host SNI notion to match against either. Therefore, there is no criterion that could be used as a rule to match incoming packets in order to route them. So UDP "routers" at this time are pretty much only load-balancers in one form or another.

services Record<string, object>

Each of the fields of the service section represents a kind of service. Which means, that for each specified service, one of the fields, and only one, has to be enabled to define what kind of service is created. Currently, the two available kinds are LoadBalancer, and Weighted.

tls object

Configures the TLS connection, TLS options, and certificate stores.

3 nested properties
certificates object[]
options object

The TLS options allow one to configure some parameters of the TLS connection.

stores object

Any store definition other than the default one (named default) will be ignored, and there is therefore only one globally available TLS store.

Definitions

httpRouter object

A router is in charge of connecting incoming requests to the services that can handle them. In the process, routers may use pieces of middleware to update the request, or act before forwarding the request to the service.

rule string required

Rules are a set of matchers configured with values, that determine if a particular request matches specific criteria. If the rule is verified, the router becomes active, calls middlewares, and then forwards the request to the service.

service string required

Each request must eventually be handled by a service, which is why each router definition should include a service target, which is basically where the request will be passed along to. HTTP routers can only target HTTP services (not TCP services).

entryPoints string[]

If not specified, HTTP routers will accept requests from all defined entry points. If you want to limit the router scope to a set of entry points, set the entryPoints option.

ruleSyntax string

In Traefik v3 a new rule syntax has been introduced (migration guide). ruleSyntax option allows to configure the rule syntax to be used for parsing the rule on a per-router basis. This allows to have heterogeneous router configurations and ease migration.

priority integer

To avoid path overlap, routes are sorted, by default, in descending order using rules length. The priority is directly equal to the length of the rule, and so the longest length has the highest priority. A value of 0 for the priority is ignored: priority = 0 means that the default rules length sorting is used.

Default: 0
min=0
middlewares string[]

You can attach a list of middlewares to each HTTP router. The middlewares will take effect only if the rule matches, and before forwarding the request to the service. Middlewares are applied in the same order as their declaration in router.

tls object

When a TLS section is specified, it instructs Traefik that the current router is dedicated to HTTPS requests only (and that the router should ignore HTTP (non TLS) requests). Traefik will terminate the SSL connections (meaning that it will send decrypted data to the services). If you need to define the same route for both HTTP and HTTPS requests, you will need to define two different routers: one with the tls section, one without.

3 nested properties
options string

The options field enables fine-grained control of the TLS parameters. It refers to a TLS Options and will be applied only if a Host rule is defined.

certResolver string

If certResolver is defined, Traefik will try to generate certificates based on routers Host & HostSNI rules.

domains object[]

You can set SANs (alternative domains) for each main domain. Every domain must have A/AAAA records pointing to Traefik. Each domain & SAN will lead to a certificate request.

httpLoadBalancerService object

The load balancers are able to load balance the requests between multiple instances of your programs.

Each service has a load-balancer, even if there is only one server to forward traffic to.

servers object[] required

Servers declare a single instance of your program.

minItems=1
sticky object

When sticky sessions are enabled, a cookie is set on the initial request and response to let the client know which server handles the first response. On subsequent requests, to keep the session alive with the same server, the client should resend the same cookie.

1 nested properties
cookie object
4 nested properties
name string

The default cookie name is an abbreviation of a sha1 (ex: _1d52e).

secure boolean
Default: false
httpOnly boolean
Default: false
sameSite string

Can be none, lax, strict or empty.

Default: ""
healthCheck object

Configure health check to remove unhealthy servers from the load balancing rotation. Traefik will consider your servers healthy as long as they return status codes between 2XX and 3XX to the health check requests (carried out every interval). Traefik keeps monitoring the health of unhealthy servers. If a server has recovered (returning 2xx -> 3xx responses again), it will be added back to the load balancer rotation pool.

9 nested properties
method string

If defined, will apply this Method for the health check request.

path string

path is appended to the server URL to set the health check endpoint.

scheme string

If defined, will replace the server URL scheme for the health check endpoint

hostname string

If defined, will apply Host header hostname to the health check request.

port integer

If defined, will replace the server URL port for the health check endpoint.

interval string

Defines the frequency of the health check calls. Interval is to be given in a format understood by time.ParseDuration. The interval must be greater than the timeout. If configuration doesn't reflect this, the interval will be set to timeout + 1 second.

timeout string

Defines the maximum duration Traefik will wait for a health check request before considering the server failed (unhealthy). Timeout is to be given in a format understood by time.ParseDuration.

headers Record<string, string>

Defines custom headers to be sent to the health check endpoint.

followRedirects boolean

Defines whether redirects should be followed during the health check calls (default: true).

Default: true
passHostHeader boolean

The passHostHeader allows to forward client Host header to server. By default, passHostHeader is true.

Default: true
responseForwarding object

Defines how Traefik forwards the response from the backend server to the client.

1 nested properties
flushInterval string

Specifies the interval in between flushes to the client while copying the response body. It is a duration in milliseconds, defaulting to 100. A negative value means to flush immediately after each write to the client. The flushInterval is ignored when ReverseProxy recognizes a response as a streaming response; for such responses, writes are flushed to the client immediately.

serversTransport string
httpWeightedService object

The WRR is able to load balance the requests between multiple services based on weights.

This strategy is only available to load balance between services and not between servers.

services object[]
sticky object

When sticky sessions are enabled, a cookie is set on the initial request and response to let the client know which server handles the first response. On subsequent requests, to keep the session alive with the same server, the client should resend the same cookie.

1 nested properties
cookie object
4 nested properties
name string

The default cookie name is an abbreviation of a sha1 (ex: _1d52e).

secure boolean
Default: false
httpOnly boolean
Default: false
sameSite string

Can be none, lax, strict or empty.

Default: ""
healthCheck object
httpMirroringService object

The mirroring is able to mirror requests sent to a service to other services. Please note that by default the whole request is buffered in memory while it is being mirrored. See the maxBodySize option for how to modify this behaviour.

service string
maxBodySize integer

maxBodySize is the maximum size allowed for the body of the request. If the body is larger, the request is not mirrored. Default value is -1, which means unlimited size.

Default: -1
mirrors object[]
healthCheck object
httpFailoverService object
service string
fallback string
healthCheck object
httpService object

The Services are responsible for configuring how to reach the actual services that will eventually handle the incoming requests.

addPrefixMiddleware object

The AddPrefix middleware updates the URL Path of the request before forwarding it.

prefix string

prefix is the string to add before the current path in the requested URL. It should include the leading slash (/).

basicAuthMiddleware object

The BasicAuth middleware is a quick way to restrict access to your services to known users. If both users and usersFile are provided, the two are merged. The contents of usersFile have precedence over the values in users.

users string[]

The users option is an array of authorized users. Each user will be declared using the name:hashed-password format.

usersFile string

The usersFile option is the path to an external file that contains the authorized users for the middleware.

The file content is a list of name:hashed-password.

realm string

You can customize the realm for the authentication with the realm option. The default value is traefik.

Default: "traefik"
headerField string

You can define a header field to store the authenticated user using the headerField option.

removeHeader boolean

Set the removeHeader option to true to remove the authorization header before forwarding the request to your service. (Default value is false.)

Default: false
bufferingMiddleware object

The Buffering middleware gives you control on how you want to read the requests before sending them to services.

With Buffering, Traefik reads the entire request into memory (possibly buffering large requests into disk), and rejects requests that are over a specified limit.

This can help services deal with large data (multipart/form-data for example), and can minimize time spent sending data to a service.

maxRequestBodyBytes integer

With the maxRequestBodyBytes option, you can configure the maximum allowed body size for the request (in Bytes).

If the request exceeds the allowed size, it is not forwarded to the service and the client gets a 413 (Request Entity Too Large) response.

memRequestBodyBytes integer

You can configure a threshold (in Bytes) from which the request will be buffered on disk instead of in memory with the memRequestBodyBytes option.

maxResponseBodyBytes integer

With the maxResponseBodyBytes option, you can configure the maximum allowed response size from the service (in Bytes).

If the response exceeds the allowed size, it is not forwarded to the client. The client gets a 413 (Request Entity Too Large) response instead.

memResponseBodyBytes integer

You can configure a threshold (in Bytes) from which the response will be buffered on disk instead of in memory with the memResponseBodyBytes option.

retryExpression string

You can have the Buffering middleware replay the request with the help of the retryExpression option.

chainMiddleware object

The Chain middleware enables you to define reusable combinations of other pieces of middleware. It makes reusing the same groups easier.

middlewares string[]
minItems=1
circuitBreakerMiddleware object

The circuit breaker protects your system from stacking requests to unhealthy services (resulting in cascading failures).

When your system is healthy, the circuit is closed (normal operations). When your system becomes unhealthy, the circuit becomes open and the requests are no longer forwarded (but handled by a fallback mechanism).

To assess if your system is healthy, the circuit breaker constantly monitors the services.

expression string

You can specify an expression that, once matched, will trigger the circuit breaker (and apply the fallback mechanism instead of calling your services).

checkPeriod string

The interval between successive checks of the circuit breaker condition (when in standby state)

fallbackDuration string

The duration for which the circuit breaker will wait before trying to recover (from a tripped state).

recoveryDuration string

The duration for which the circuit breaker will try to recover (as soon as it is in recovering state).

responseCode integer

The status code that the circuit breaker will return while it is in the open state.

compressMiddleware object

The Compress middleware enables the gzip compression.

excludedContentTypes string[]

excludedContentTypes specifies a list of content types to compare the Content-Type header of the incoming requests to before compressing.

The requests with content types defined in excludedContentTypes are not compressed.

Content types are compared in a case-insensitive, whitespace-ignored manner.

minResponseBodyBytes integer

specifies the minimum amount of bytes a response body must have to be compressed.

defaultEncoding string

defaultEncoding specifies the default encoding if the Accept-Encoding header is not in the request or contains a wildcard (*).

includedContentTypes string[]

includedContentTypes specifies a list of content types to compare the Content-Type header of the responses before compressing.

The responses with content types defined in includedContentTypes are compressed.

Content types are compared in a case-insensitive, whitespace-ignored manner.

encodings string[]

encodings specifies the list of supported compression encodings. At least one encoding value must be specified, and valid entries are zstd (Zstandard), br (Brotli), and gzip (Gzip). The order of the list also sets the priority, the top entry has the highest priority.

contentTypeMiddleware object

The Content-Type middleware - or rather its unique autoDetect option - specifies whether to let the Content-Type header, if it has not been set by the backend, be automatically set to a value derived from the contents of the response.

As a proxy, the default behavior should be to leave the header alone, regardless of what the backend did with it. However, the historic default was to always auto-detect and set the header if it was nil, and it is going to be kept that way in order to support users currently relying on it. This middleware exists to enable the correct behavior until at least the default one can be changed in a future version.

autoDetect boolean

autoDetect specifies whether to let the Content-Type header, if it has not been set by the backend, be automatically set to a value derived from the contents of the response.

Default: false
digestAuthMiddleware object

The DigestAuth middleware is a quick way to restrict access to your services to known users. If both users and usersFile are provided, the two are merged. The contents of usersFile have precedence over the values in users.

users string[]

The users option is an array of authorized users. Each user will be declared using the name:realm:encoded-password format.

usersFile string

The usersFile option is the path to an external file that contains the authorized users for the middleware.

The file content is a list of name:realm:encoded-password.

realm string

You can customize the realm for the authentication with the realm option. The default value is traefik.

Default: "traefik"
headerField string

You can customize the header field for the authenticated user using the headerField option.

removeHeader boolean

Set the removeHeader option to true to remove the authorization header before forwarding the request to your service. (Default value is false.)

Default: false
errorsMiddleware object

The ErrorPage middleware returns a custom page in lieu of the default, according to configured ranges of HTTP Status codes. The error page itself is not hosted by Traefik.

status string[]

The status that will trigger the error page.

The status code ranges are inclusive (500-599 will trigger with every code between 500 and 599, 500 and 599 included). You can define either a status code like 500 or ranges with a syntax like 500-599.

service string

The service that will serve the new requested error page.

query string

The URL for the error page (hosted by service). You can use {status} in the query, that will be replaced by the received status code.

forwardAuthMiddleware object

The ForwardAuth middleware delegate the authentication to an external service. If the service response code is 2XX, access is granted and the original request is performed. Otherwise, the response from the authentication server is returned.

address string

The address option defines the authentication server address.

tls object

The tls option is the TLS configuration from Traefik to the authentication server.

4 nested properties
ca string

Certificate Authority used for the secured connection to the authentication server.

cert string

Public certificate used for the secured connection to the authentication server.

key string

Private certificate used for the secure connection to the authentication server.

insecureSkipVerify boolean

If insecureSkipVerify is true, TLS for the connection to authentication server accepts any certificate presented by the server and any host name in that certificate.

trustForwardHeader boolean

Set the trustForwardHeader option to true to trust all the existing X-Forwarded-* headers.

authResponseHeaders string[]

The authResponseHeaders option is the list of the headers to copy from the authentication server to the request.

authResponseHeadersRegex string

The authResponseHeadersRegex option is the regex to match headers to copy from the authentication server response and set on forwarded request, after stripping all headers that match the regex.

authRequestHeaders string[]

The authRequestHeaders option is the list of the headers to copy from the request to the authentication server.

addAuthCookiesToResponse string[]

The addAuthCookiesToResponse option is the list of cookies to copy from the authentication server to the response, replacing any existing conflicting cookie from the forwarded response.

forwardBody boolean

Sets the forwardBody option to true to send the Body. As body is read inside Traefik before forwarding, this breaks streaming.

maxBodySize number

Sets the maxBodySize to limit the body size in bytes. If body is bigger than this, it returns a 401 (unauthorized).

maxResponseBodySize number

Sets the maxResponseBodySize to limit the response body size from the authentication server in bytes.

headerField string

Defines a header field to store the authenticated user.

preserveLocationHeader boolean

Defines whether to forward the Location header to the client as is or prefix it with the domain name of the authentication server.

preserveRequestMethod boolean

Defines whether to preserve the original request method while forwarding the request to the authentication server.

grpcWebMiddleware object

The GrpcWeb middleware converts gRPC Web requests to HTTP/2 gRPC requests before forwarding them to the backends.

allowOrigins string[]

The allowOrigins contains the list of allowed origins. A wildcard origin * can also be configured to match all requests.

headersMiddleware object

The Headers middleware can manage the requests/responses headers.

customRequestHeaders Record<string, string>

The customRequestHeaders option lists the Header names and values to apply to the request.

customResponseHeaders Record<string, string>

The customResponseHeaders option lists the Header names and values to apply to the response.

accessControlAllowCredentials boolean

The accessControlAllowCredentials indicates whether the request can include user credentials.

accessControlAllowHeaders string[]

The accessControlAllowHeaders indicates which header field names can be used as part of the request.

accessControlAllowMethods string[]

The accessControlAllowMethods indicates which methods can be used during requests.

accessControlAllowOriginList string[]

The accessControlAllowOriginList indicates whether a resource can be shared by returning different values.

A wildcard origin * can also be configured, and will match all requests. If this value is set by a backend server, it will be overwritten by Traefik

This value can contain a list of allowed origins.

accessControlAllowOriginListRegex string[]

The accessControlAllowOriginListRegex option is the counterpart of the accessControlAllowOriginList option with regular expressions instead of origin values.

accessControlExposeHeaders string[]

The accessControlExposeHeaders indicates which headers are safe to expose to the api of a CORS API specification.

accessControlMaxAge integer

The accessControlMaxAge indicates how long (in seconds) a preflight request can be cached.

addVaryHeader boolean

The addVaryHeader is used in conjunction with accessControlAllowOriginList to determine whether the vary header should be added or modified to demonstrate that server responses can differ based on the value of the origin header.

allowedHosts string[]

The allowedHosts option lists fully qualified domain names that are allowed.

hostsProxyHeaders string[]

The hostsProxyHeaders option is a set of header keys that may hold a proxied hostname value for the request.

sslRedirect boolean

The sslRedirect is set to true, then only allow https requests.

sslTemporaryRedirect boolean

Set the sslTemporaryRedirect to true to force an SSL redirection using a 302 (instead of a 301).

sslHost string

The sslHost option is the host name that is used to redirect http requests to https.

sslProxyHeaders Record<string, string>

The sslProxyHeaders option is set of header keys with associated values that would indicate a valid https request. Useful when using other proxies with header like: "X-Forwarded-Proto": "https".

sslForceHost boolean

Set sslForceHost to true and set SSLHost to forced requests to use SSLHost even the ones that are already using SSL.

stsSeconds integer

The stsSeconds is the max-age of the Strict-Transport-Security header. If set to 0, would NOT include the header.

stsIncludeSubdomains boolean

The stsIncludeSubdomains is set to true, the includeSubDomains directive will be appended to the Strict-Transport-Security header.

stsPreload boolean

Set stsPreload to true to have the preload flag appended to the Strict-Transport-Security header.

forceSTSHeader boolean

Set forceSTSHeader to true, to add the STS header even when the connection is HTTP.

frameDeny boolean

Set frameDeny to true to add the X-Frame-Options header with the value of DENY.

customFrameOptionsValue string

The customFrameOptionsValue allows the X-Frame-Options header value to be set with a custom value. This overrides the FrameDeny option.

contentTypeNosniff boolean

Set contentTypeNosniff to true to add the X-Content-Type-Options header with the value nosniff.

browserXssFilter boolean

Set browserXssFilter to true to add the X-XSS-Protection header with the value 1; mode=block.

customBrowserXSSValue string

The customBrowserXssValue option allows the X-XSS-Protection header value to be set with a custom value. This overrides the BrowserXssFilter option.

contentSecurityPolicy string

The contentSecurityPolicy option allows the Content-Security-Policy header value to be set with a custom value.

contentSecurityPolicyReportOnly string

The contentSecurityPolicyReportOnly option allows the Content-Security-Policy-Report-Only header value to be set with a custom value.

publicKey string

The publicKey implements HPKP to prevent MITM attacks with forged certificates.

referrerPolicy string

The referrerPolicy allows sites to control when browsers will pass the Referer header to other sites.

featurePolicy string

The featurePolicy allows sites to control browser features.

permissionsPolicy string

The permissionsPolicy allows sites to control browser features.

isDevelopment boolean

Set isDevelopment to true when developing. The AllowedHosts, SSL, and STS options can cause some unwanted effects. Usually testing happens on http, not https, and on localhost, not your production domain. If you would like your development environment to mimic production with complete Host blocking, SSL redirects, and STS headers, leave this as false.

ipStrategy object

The ipStrategy option defines parameters that set how Traefik will determine the client IP.

depth integer

The depth option tells Traefik to use the X-Forwarded-For header and take the IP located at the depth position (starting from the right). If depth is greater than the total number of IPs in X-Forwarded-For, then the client IP will be empty. depth is ignored if its value is lesser than or equal to 0.

excludedIPs string[]

excludedIPs tells Traefik to scan the X-Forwarded-For header and pick the first IP not in the list. If depth is specified, excludedIPs is ignored.

ipWhiteListMiddleware object

DEPRECATED: IPWhitelist accepts / refuses requests based on the client IP.

sourceRange string[]

The sourceRange option sets the allowed IPs (or ranges of allowed IPs by using CIDR notation).

ipStrategy object

The ipStrategy option defines parameters that set how Traefik will determine the client IP.

2 nested properties
depth integer

The depth option tells Traefik to use the X-Forwarded-For header and take the IP located at the depth position (starting from the right). If depth is greater than the total number of IPs in X-Forwarded-For, then the client IP will be empty. depth is ignored if its value is lesser than or equal to 0.

excludedIPs string[]

excludedIPs tells Traefik to scan the X-Forwarded-For header and pick the first IP not in the list. If depth is specified, excludedIPs is ignored.

ipAllowListMiddleware object

IPAllowList accepts / refuses requests based on the client IP.

sourceRange string[]

The sourceRange option sets the allowed IPs (or ranges of allowed IPs by using CIDR notation).

rejectStatusCode integer

RejectStatusCode defines the HTTP status code used for refused requests. If not set, the default is 403 (Forbidden).

ipStrategy object

The ipStrategy option defines parameters that set how Traefik will determine the client IP.

2 nested properties
depth integer

The depth option tells Traefik to use the X-Forwarded-For header and take the IP located at the depth position (starting from the right). If depth is greater than the total number of IPs in X-Forwarded-For, then the client IP will be empty. depth is ignored if its value is lesser than or equal to 0.

excludedIPs string[]

excludedIPs tells Traefik to scan the X-Forwarded-For header and pick the first IP not in the list. If depth is specified, excludedIPs is ignored.

sourceCriterion object

SourceCriterion defines what criterion is used to group requests as originating from a common source. The precedence order is ipStrategy, then requestHeaderName, then requestHost. If none are set, the default is to use the requestHost.

ipStrategy object

The ipStrategy option defines parameters that set how Traefik will determine the client IP.

2 nested properties
depth integer

The depth option tells Traefik to use the X-Forwarded-For header and take the IP located at the depth position (starting from the right). If depth is greater than the total number of IPs in X-Forwarded-For, then the client IP will be empty. depth is ignored if its value is lesser than or equal to 0.

excludedIPs string[]

excludedIPs tells Traefik to scan the X-Forwarded-For header and pick the first IP not in the list. If depth is specified, excludedIPs is ignored.

requestHeaderName string

Requests having the same value for the given header are grouped as coming from the same source.

requestHost boolean

Whether to consider the request host as the source.

inFlightReqMiddleware object

To proactively prevent services from being overwhelmed with high load, a limit on the number of simultaneous in-flight requests can be applied.

amount integer

The amount option defines the maximum amount of allowed simultaneous in-flight request. The middleware will return an HTTP 429 Too Many Requests if there are already amount requests in progress (based on the same sourceCriterion strategy).

sourceCriterion object

SourceCriterion defines what criterion is used to group requests as originating from a common source. The precedence order is ipStrategy, then requestHeaderName, then requestHost. If none are set, the default is to use the requestHost.

3 nested properties
ipStrategy object

The ipStrategy option defines parameters that set how Traefik will determine the client IP.

2 nested properties
depth integer

The depth option tells Traefik to use the X-Forwarded-For header and take the IP located at the depth position (starting from the right). If depth is greater than the total number of IPs in X-Forwarded-For, then the client IP will be empty. depth is ignored if its value is lesser than or equal to 0.

excludedIPs string[]

excludedIPs tells Traefik to scan the X-Forwarded-For header and pick the first IP not in the list. If depth is specified, excludedIPs is ignored.

requestHeaderName string

Requests having the same value for the given header are grouped as coming from the same source.

requestHost boolean

Whether to consider the request host as the source.

passTLSClientCertMiddleware object

PassTLSClientCert adds in header the selected data from the passed client tls certificate.

pem boolean

The pem option sets the X-Forwarded-Tls-Client-Cert header with the escape certificate.

info object

The info option select the specific client certificate details you want to add to the X-Forwarded-Tls-Client-Cert-Info header. The value of the header will be an escaped concatenation of all the selected certificate details.

5 nested properties
notAfter boolean

Set the notAfter option to true to add the Not After information from the Validity part.

notBefore boolean

Set the notBefore option to true to add the Not Before information from the Validity part.

sans boolean

Set the sans option to true to add the Subject Alternative Name information from the Subject Alternative Name part.

subject object

The subject select the specific client certificate subject details you want to add to the X-Forwarded-Tls-Client-Cert-Info header.

7 nested properties
country boolean

Set the country option to true to add the country information into the subject.

province boolean

Set the province option to true to add the province information into the subject.

locality boolean

Set the locality option to true to add the locality information into the subject.

organization boolean

Set the organization option to true to add the organization information into the subject.

commonName boolean

Set the commonName option to true to add the commonName information into the subject.

serialNumber boolean

Set the serialNumber option to true to add the serialNumber information into the subject.

domainComponent boolean

Set the domainComponent option to true to add the domainComponent information into the subject.

issuer object

The issuer select the specific client certificate issuer details you want to add to the X-Forwarded-Tls-Client-Cert-Info header.

7 nested properties
country boolean

Set the country option to true to add the country information into the issuer.

province boolean

Set the province option to true to add the province information into the issuer.

locality boolean

Set the locality option to true to add the locality information into the issuer.

organization boolean

Set the organization option to true to add the organization information into the issuer.

commonName boolean

Set the commonName option to true to add the commonName information into the issuer.

serialNumber boolean

Set the serialNumber option to true to add the serialNumber information into the issuer.

domainComponent boolean

Set the domainComponent option to true to add the domainComponent information into the issuer.

pluginMiddleware Record<string, object>

Some plugins will need to be configured by adding a dynamic configuration.

rateLimitMiddleware object

The RateLimit middleware ensures that services will receive a fair number of requests, and allows one to define what fair is.

average string | number

average is the maximum rate, by default in requests by second, allowed for the given source.

It defaults to 0, which means no rate limiting.

The rate is actually defined by dividing average by period. So for a rate below 1 req/s, one needs to define a period larger than a second.

period string | number

period, in combination with average, defines the actual maximum rate.

It defaults to 1 second.

burst number

burst is the maximum number of requests allowed to go through in the same arbitrarily small period of time.

It defaults to 1.

Default: 1
sourceCriterion object

SourceCriterion defines what criterion is used to group requests as originating from a common source. The precedence order is ipStrategy, then requestHeaderName, then requestHost. If none are set, the default is to use the requestHost.

3 nested properties
ipStrategy object

The ipStrategy option defines parameters that set how Traefik will determine the client IP.

2 nested properties
depth integer

The depth option tells Traefik to use the X-Forwarded-For header and take the IP located at the depth position (starting from the right). If depth is greater than the total number of IPs in X-Forwarded-For, then the client IP will be empty. depth is ignored if its value is lesser than or equal to 0.

excludedIPs string[]

excludedIPs tells Traefik to scan the X-Forwarded-For header and pick the first IP not in the list. If depth is specified, excludedIPs is ignored.

requestHeaderName string

Requests having the same value for the given header are grouped as coming from the same source.

requestHost boolean

Whether to consider the request host as the source.

redirectRegexMiddleware object

RegexRedirect redirect a request from an url to another with regex matching and replacement.

permanent boolean

Set the permanent option to true to apply a permanent redirection.

regex string

The regex option is the regular expression to match and capture elements from the request URL.

replacement string

The replacement option defines how to modify the URL to have the new target URL. Care should be taken when defining replacement expand variables: $1x is equivalent to ${1x}, not ${1}x (see Regexp.Expand), so use ${1} syntax.

redirectSchemeMiddleware object

RedirectScheme redirect request from a scheme to another.

permanent boolean

Set the permanent option to true to apply a permanent redirection.

scheme string

The scheme option defines the scheme of the new url.

port string

The port option defines the port of the new url. Port in this configuration is a string, not a numeric value.

replacePathMiddleware object

Replace the path of the request url. It will replace the actual path by the specified one and will store the original path in a X-Replaced-Path header.

path string

The path option defines the path to use as replacement in the request url.

replacePathRegexMiddleware object

The ReplaceRegex replace a path from an url to another with regex matching and replacement. It will replace the actual path by the specified one and store the original path in a X-Replaced-Path header.

regex string

The regex option is the regular expression to match and capture the path from the request URL.

replacement string

The replacement option defines how to modify the path to have the new target path. Care should be taken when defining replacement expand variables: $1x is equivalent to ${1x}, not ${1}x (see Regexp.Expand), so use ${1} syntax.

retryMiddleware object

The Retry middleware is in charge of reissuing a request a given number of times to a backend server if that server does not reply. To be clear, as soon as the server answers, the middleware stops retrying, regardless of the response status.

attempts integer required

The attempts option defines how many times the request should be retried.

initialInterval string

The initialInterval option defines the first wait time in the exponential backoff series.

stripPrefixMiddleware object

Remove the specified prefixes from the URL path. It will strip the matching path prefix and will store the matching path prefix in a X-Forwarded-Prefix header.

prefixes string[]

The prefixes option defines the prefixes to strip from the request URL

forceSlash boolean

The forceSlash option makes sure that the resulting stripped path is not the empty string, by replacing it with / when necessary.

This option was added to keep the initial (non-intuitive) behavior of this middleware, in order to avoid introducing a breaking change.

It's recommended to explicitly set forceSlash to false.

stripPrefixRegexMiddleware object

Remove the matching prefixes from the URL path. It will strip the matching path prefix and will store the matching path prefix in a X-Forwarded-Prefix header.

regex string[]

The regex option is the regular expression to match the path prefix from the request URL.

httpMiddleware object
tcpRouter object

If both HTTP routers and TCP routers listen to the same entry points, the TCP routers will apply before the HTTP routers. If no matching route is found for the TCP routers, then the HTTP routers will take over.

rule string required

It is important to note that the Server Name Indication is an extension of the TLS protocol. Hence, only TLS routers will be able to specify a domain name with that rule. However, non-TLS routers will have to explicitly use that rule with * (every domain) to state that every non-TLS request will be handled by the router.

service string required

You must attach a TCP service per TCP router. Services are the target for the router. TCP routers can only target TCP services (not HTTP services).

entryPoints string[]

If not specified, TCP routers will accept requests from all defined entry points. If you want to limit the router scope to a set of entry points, set the entry points option.

middlewares string[]
ruleSyntax string

In Traefik v3 a new rule syntax has been introduced (migration guide). ruleSyntax option allows to configure the rule syntax to be used for parsing the rule on a per-router basis. This allows to have heterogeneous router configurations and ease migration.

priority integer

To avoid path overlap, routes are sorted, by default, in descending order using rules length. The priority is directly equal to the length of the rule, and so the longest length has the highest priority. A value of 0 for the priority is ignored: priority = 0 means that the default rules length sorting is used.

Default: 0
min=0
tls object

When a TLS section is specified, it instructs Traefik that the current router is dedicated to TLS requests only (and that the router should ignore non-TLS requests).

By default, a router with a TLS section will terminate the TLS connections, meaning that it will send decrypted data to the services.

4 nested properties
passthrough boolean

A TLS router will terminate the TLS connection by default. However, the passthrough option can be specified to set whether the requests should be forwarded "as is", keeping all data encrypted.

Default: false
options string

The options field enables fine-grained control of the TLS parameters. It refers to a TLS Options and will be applied only if a Host rule is defined.

certResolver string

If certResolver is defined, Traefik will try to generate certificates based on routers Host & HostSNI rules.

domains object[]

You can set SANs (alternative domains) for each main domain. Every domain must have A/AAAA records pointing to Traefik. Each domain & SAN will lead to a certificate request.

tcpLoadBalancerService object
servers object[] required

Servers declare a single instance of your program.

minItems=1
terminationDelay number

As a proxy between a client and a server, it can happen that either side (e.g. client side) decides to terminate its writing capability on the connection (i.e. issuance of a FIN packet). The proxy needs to propagate that intent to the other side, and so when that happens, it also does the same on its connection with the other side (e.g. backend side).

However, if for some reason (bad implementation, or malicious intent) the other side does not eventually do the same as well, the connection would stay half-open, which would lock resources for however long.

To that end, as soon as the proxy enters this termination sequence, it sets a deadline on fully terminating the connections on both sides.

The termination delay controls that deadline. It is a duration in milliseconds, defaulting to 100. A negative value means an infinite deadline (i.e. the connection is never fully terminated by the proxy itself).

Default: 100
proxyProtocol object
1 nested properties
version integer
serversTransport string
tcpWeightedService object
services object[] required
minItems=1
tcpService object
udpRouter object
service string required

There must be one (and only one) UDP service referenced per UDP router. Services are the target for the router.

entryPoints string[]

If not specified, UDP routers will accept packets from all defined (UDP) entry points. If one wants to limit the router scope to a set of entry points, one should set the entry points option.

udpLoadBalancerService object

The servers load balancer is in charge of balancing the requests between the servers of the same service.

servers object[] required

The servers field defines all the servers that are part of this load-balancing group, i.e. each address (IP:Port) on which an instance of the service's program is deployed.

minItems=1
udpWeightedService object
services object[] required
minItems=1
udpService object