2018-11-27 16:42:04 +00:00
|
|
|
package static
|
|
|
|
|
|
|
|
// EntryPoint holds the entry point configuration.
|
|
|
|
type EntryPoint struct {
|
2019-06-17 09:48:05 +00:00
|
|
|
Address string `description:"Entry point address."`
|
|
|
|
Transport *EntryPointsTransport `description:"Configures communication between clients and Traefik."`
|
|
|
|
ProxyProtocol *ProxyProtocol `description:"Proxy-Protocol configuration." label:"allowEmpty"`
|
|
|
|
ForwardedHeaders *ForwardedHeaders `description:"Trust client forwarding headers."`
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetDefaults sets the default values.
|
|
|
|
func (e *EntryPoint) SetDefaults() {
|
|
|
|
e.Transport = &EntryPointsTransport{}
|
|
|
|
e.Transport.SetDefaults()
|
|
|
|
e.ForwardedHeaders = &ForwardedHeaders{}
|
2019-01-15 08:44:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ForwardedHeaders Trust client forwarding headers.
|
|
|
|
type ForwardedHeaders struct {
|
2019-06-17 09:48:05 +00:00
|
|
|
Insecure bool `description:"Trust all forwarded headers." export:"true"`
|
|
|
|
TrustedIPs []string `description:"Trust only forwarded headers from selected IPs."`
|
2018-11-27 16:42:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ProxyProtocol contains Proxy-Protocol configuration.
|
|
|
|
type ProxyProtocol struct {
|
2019-06-17 09:48:05 +00:00
|
|
|
Insecure bool `description:"Trust all." export:"true"`
|
|
|
|
TrustedIPs []string `description:"Trust only selected IPs."`
|
2018-11-27 16:42:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EntryPoints holds the HTTP entry point list.
|
|
|
|
type EntryPoints map[string]*EntryPoint
|
|
|
|
|
|
|
|
// EntryPointsTransport configures communication between clients and Traefik.
|
|
|
|
type EntryPointsTransport struct {
|
2019-06-17 09:48:05 +00:00
|
|
|
LifeCycle *LifeCycle `description:"Timeouts influencing the server life cycle." export:"true"`
|
|
|
|
RespondingTimeouts *RespondingTimeouts `description:"Timeouts for incoming requests to the Traefik instance." export:"true"`
|
2018-11-27 16:42:04 +00:00
|
|
|
}
|
|
|
|
|
2019-06-17 09:48:05 +00:00
|
|
|
// SetDefaults sets the default values.
|
|
|
|
func (t *EntryPointsTransport) SetDefaults() {
|
|
|
|
t.LifeCycle = &LifeCycle{}
|
|
|
|
t.LifeCycle.SetDefaults()
|
|
|
|
t.RespondingTimeouts = &RespondingTimeouts{}
|
|
|
|
t.RespondingTimeouts.SetDefaults()
|
2019-01-15 08:44:03 +00:00
|
|
|
}
|