4.1 KiB
title | description |
---|---|
Traefik HTTP Documentation | Provide your dynamic configuration via an HTTP(S) endpoint and let Traefik Proxy do the rest. Read the technical documentation. |
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.
providers:
http:
endpoint: "http://127.0.0.1:9000/api"
[providers.http]
endpoint = "http://127.0.0.1:9000/api"
--providers.http.endpoint=http://127.0.0.1:9000/api
pollInterval
Optional, Default="5s"
Defines the polling interval.
providers:
http:
pollInterval: "5s"
[providers.http]
pollInterval = "5s"
--providers.http.pollInterval=5s
pollTimeout
Optional, Default="5s"
Defines the polling timeout when connecting to the endpoint.
providers:
http:
pollTimeout: "5s"
[providers.http]
pollTimeout = "5s"
--providers.http.pollTimeout=5s
tls
Optional
Defines the TLS configuration used for the secure connection to the endpoint.
ca
Optional
ca
is the path to the certificate authority used for the secure connection to the endpoint,
it defaults to the system bundle.
providers:
http:
tls:
ca: path/to/ca.crt
[providers.http.tls]
ca = "path/to/ca.crt"
--providers.http.tls.ca=path/to/ca.crt
caOptional
Optional
The value of caOptional
defines which policy should be used for the secure connection with TLS Client Authentication to the endpoint.
!!! warning ""
If `ca` is undefined, this option will be ignored, and no client certificate will be requested during the handshake. Any provided certificate will thus never be verified.
When this option is set to true
, a client certificate is requested during the handshake but is not required. If a certificate is sent, it is required to be valid.
When this option is set to false
, a client certificate is requested during the handshake, and at least one valid certificate should be sent by the client.
providers:
http:
tls:
caOptional: true
[providers.http.tls]
caOptional = true
--providers.http.tls.caOptional=true
cert
Optional
cert
is the path to the public certificate used for the secure connection to the endpoint.
When using this option, setting the key
option is required.
providers:
http:
tls:
cert: path/to/foo.cert
key: path/to/foo.key
[providers.http.tls]
cert = "path/to/foo.cert"
key = "path/to/foo.key"
--providers.http.tls.cert=path/to/foo.cert
--providers.http.tls.key=path/to/foo.key
key
Optional
key
is the path to the private key used for the secure connection to the endpoint.
When using this option, setting the cert
option is required.
providers:
http:
tls:
cert: path/to/foo.cert
key: path/to/foo.key
[providers.http.tls]
cert = "path/to/foo.cert"
key = "path/to/foo.key"
--providers.http.tls.cert=path/to/foo.cert
--providers.http.tls.key=path/to/foo.key
insecureSkipVerify
Optional, Default=false
If insecureSkipVerify
is true
, the TLS connection to the endpoint accepts any certificate presented by the server regardless of the hostnames it covers.
providers:
http:
tls:
insecureSkipVerify: true
[providers.http.tls]
insecureSkipVerify = true
--providers.http.tls.insecureSkipVerify=true