Traefik & HTTP
Provide your dynamic configuration via an HTTP(s) endpoint and let Traefik do the rest!
Routing Configuration
The HTTP provider uses the same configuration as the File Provider in YAML or JSON format.
Provider Configuration
endpoint
Required
Defines the HTTP(s) endpoint to poll.
File (TOML)
[providers.http]
endpoint = "http://127.0.0.1:9000/api"
File (YAML)
providers:
http:
endpoint:
- "http://127.0.0.1:9000/api"
CLI
--providers.http.endpoint=http://127.0.0.1:9000/api
pollInterval
Optional, Default=”5s”
Defines the polling interval.
File (TOML)
[providers.http]
pollInterval = "5s"
File (YAML)
providers:
http:
pollInterval: "5s"
CLI
--providers.http.pollInterval=5s
pollTimeout
Optional, Default=”5s”
Defines the polling timeout when connecting to the configured endpoint.
File (TOML)
[providers.http]
pollTimeout = "5s"
File (YAML)
providers:
http:
pollTimeout: "5s"
CLI
--providers.http.pollTimeout=5s
tls
Optional
tls.ca
Certificate Authority used for the secured connection to the configured Endpoint.
File (TOML)
[providers.http.tls]
ca = "path/to/ca.crt"
File (YAML)
providers:
http:
tls:
ca: path/to/ca.crt
CLI
--providers.http.tls.ca=path/to/ca.crt
tls.caOptional
Policy followed for the secured connection with TLS Client Authentication to the configured Endpoint. Requires tls.ca
to be defined.
true
: VerifyClientCertIfGivenfalse
: RequireAndVerifyClientCertif
tls.ca
is undefined NoClientCertFile (TOML)
[providers.http.tls]
caOptional = true
File (YAML)
providers:
http:
tls:
caOptional: true
CLI
--providers.http.tls.caOptional=true
tls.cert
Public certificate used for the secured connection to the configured Endpoint.
File (TOML)
[providers.http.tls]
cert = "path/to/foo.cert"
key = "path/to/foo.key"
File (YAML)
providers:
http:
tls:
cert: path/to/foo.cert
key: path/to/foo.key
CLI
--providers.http.tls.cert=path/to/foo.cert
--providers.http.tls.key=path/to/foo.key
tls.key
Private certificate used for the secured connection to the configured Endpoint.
File (TOML)
[providers.http.tls]
cert = "path/to/foo.cert"
key = "path/to/foo.key"
File (YAML)
providers:
http:
tls:
cert: path/to/foo.cert
key: path/to/foo.key
CLI
--providers.http.tls.cert=path/to/foo.cert
--providers.http.tls.key=path/to/foo.key
tls.insecureSkipVerify
If insecureSkipVerify
is true
, TLS connection to the configured Endpoint accepts any certificate presented by the server and any host name in that certificate.
File (TOML)
[providers.http.tls]
insecureSkipVerify = true
File (YAML)
providers:
http:
tls:
insecureSkipVerify: true
CLI
--providers.http.tls.insecureSkipVerify=true