"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pkg/config/static/entrypoints.go" between
traefik-v2.3.2.src.tar.gz and traefik-v2.3.3.src.tar.gz

About: Traefik is a cloud native edge router, a reverse proxy and load balancer for HTTP and TCP-based applications.

entrypoints.go  (traefik-v2.3.2.src):entrypoints.go  (traefik-v2.3.3.src)
skipping to change at line 14 skipping to change at line 14
"fmt" "fmt"
"math" "math"
"strings" "strings"
"github.com/traefik/traefik/v2/pkg/types" "github.com/traefik/traefik/v2/pkg/types"
) )
// EntryPoint holds the entry point configuration. // EntryPoint holds the entry point configuration.
type EntryPoint struct { type EntryPoint struct {
Address string `description:"Entry point address. " json:"address,omitempty" toml:"address,omitempty" yaml:"address,omitempty"` Address string `description:"Entry point address. " json:"address,omitempty" toml:"address,omitempty" yaml:"address,omitempty"`
Transport *EntryPointsTransport `description:"Configures communica Transport *EntryPointsTransport `description:"Configures communica
tion between clients and Traefik." json:"transport,omitempty" toml:"transport,om tion between clients and Traefik." json:"transport,omitempty" toml:"transport,om
itempty" yaml:"transport,omitempty"` itempty" yaml:"transport,omitempty" export:"true"`
ProxyProtocol *ProxyProtocol `description:"Proxy-Protocol confi ProxyProtocol *ProxyProtocol `description:"Proxy-Protocol confi
guration." json:"proxyProtocol,omitempty" toml:"proxyProtocol,omitempty" yaml:"p guration." json:"proxyProtocol,omitempty" toml:"proxyProtocol,omitempty" yaml:"p
roxyProtocol,omitempty" label:"allowEmpty" file:"allowEmpty"` roxyProtocol,omitempty" label:"allowEmpty" file:"allowEmpty" export:"true"`
ForwardedHeaders *ForwardedHeaders `description:"Trust client forward ForwardedHeaders *ForwardedHeaders `description:"Trust client forward
ing headers." json:"forwardedHeaders,omitempty" toml:"forwardedHeaders,omitempty ing headers." json:"forwardedHeaders,omitempty" toml:"forwardedHeaders,omitempty
" yaml:"forwardedHeaders,omitempty"` " yaml:"forwardedHeaders,omitempty" export:"true"`
HTTP HTTPConfig `description:"HTTP configuration." HTTP HTTPConfig `description:"HTTP configuration."
json:"http,omitempty" toml:"http,omitempty" yaml:"http,omitempty"` json:"http,omitempty" toml:"http,omitempty" yaml:"http,omitempty" export:"true"
`
} }
// GetAddress strips any potential protocol part of the address field of the // GetAddress strips any potential protocol part of the address field of the
// entry point, in order to return the actual address. // entry point, in order to return the actual address.
func (ep EntryPoint) GetAddress() string { func (ep EntryPoint) GetAddress() string {
splitN := strings.SplitN(ep.Address, "/", 2) splitN := strings.SplitN(ep.Address, "/", 2)
return splitN[0] return splitN[0]
} }
// GetProtocol returns the protocol part of the address field of the entry point . // GetProtocol returns the protocol part of the address field of the entry point .
skipping to change at line 52 skipping to change at line 52
// SetDefaults sets the default values. // SetDefaults sets the default values.
func (ep *EntryPoint) SetDefaults() { func (ep *EntryPoint) SetDefaults() {
ep.Transport = &EntryPointsTransport{} ep.Transport = &EntryPointsTransport{}
ep.Transport.SetDefaults() ep.Transport.SetDefaults()
ep.ForwardedHeaders = &ForwardedHeaders{} ep.ForwardedHeaders = &ForwardedHeaders{}
} }
// HTTPConfig is the HTTP configuration of an entry point. // HTTPConfig is the HTTP configuration of an entry point.
type HTTPConfig struct { type HTTPConfig struct {
Redirections *Redirections `description:"Set of redirection" json:"redire Redirections *Redirections `description:"Set of redirection" json:"redire
ctions,omitempty" toml:"redirections,omitempty" yaml:"redirections,omitempty"` ctions,omitempty" toml:"redirections,omitempty" yaml:"redirections,omitempty" ex
Middlewares []string `description:"Default middlewares for the rout port:"true"`
ers linked to the entry point." json:"middlewares,omitempty" toml:"middlewares,o Middlewares []string `description:"Default middlewares for the rout
mitempty" yaml:"middlewares,omitempty"` ers linked to the entry point." json:"middlewares,omitempty" toml:"middlewares,o
TLS *TLSConfig `description:"Default TLS configuration for th mitempty" yaml:"middlewares,omitempty" export:"true"`
e routers linked to the entry point." json:"tls,omitempty" toml:"tls,omitempty" TLS *TLSConfig `description:"Default TLS configuration for th
yaml:"tls,omitempty" label:"allowEmpty" file:"allowEmpty"` e routers linked to the entry point." json:"tls,omitempty" toml:"tls,omitempty"
yaml:"tls,omitempty" label:"allowEmpty" file:"allowEmpty" export:"true"`
} }
// Redirections is a set of redirection for an entry point. // Redirections is a set of redirection for an entry point.
type Redirections struct { type Redirections struct {
EntryPoint *RedirectEntryPoint `description:"Set of redirection for an en try point." json:"entryPoint,omitempty" toml:"entryPoint,omitempty" yaml:"entryP oint,omitempty"` EntryPoint *RedirectEntryPoint `description:"Set of redirection for an en try point." json:"entryPoint,omitempty" toml:"entryPoint,omitempty" yaml:"entryP oint,omitempty" export:"true"`
} }
// RedirectEntryPoint is the definition of an entry point redirection. // RedirectEntryPoint is the definition of an entry point redirection.
type RedirectEntryPoint struct { type RedirectEntryPoint struct {
To string `description:"Targeted entry point of the redirection." To string `description:"Targeted entry point of the redirection."
json:"to,omitempty" toml:"to,omitempty" yaml:"to,omitempty"` json:"to,omitempty" toml:"to,omitempty" yaml:"to,omitempty" export:"true"`
Scheme string `description:"Scheme used for the redirection." json:"sc Scheme string `description:"Scheme used for the redirection." json:"sc
heme,omitempty" toml:"scheme,omitempty" yaml:"scheme,omitempty"` heme,omitempty" toml:"scheme,omitempty" yaml:"scheme,omitempty" export:"true"`
Permanent bool `description:"Applies a permanent redirection." json:"pe Permanent bool `description:"Applies a permanent redirection." json:"pe
rmanent,omitempty" toml:"permanent,omitempty" yaml:"permanent,omitempty"` rmanent,omitempty" toml:"permanent,omitempty" yaml:"permanent,omitempty" export:
Priority int `description:"Priority of the generated router." json:"p "true"`
riority,omitempty" toml:"priority,omitempty" yaml:"priority,omitempty"` Priority int `description:"Priority of the generated router." json:"p
riority,omitempty" toml:"priority,omitempty" yaml:"priority,omitempty" export:"t
rue"`
} }
// SetDefaults sets the default values. // SetDefaults sets the default values.
func (r *RedirectEntryPoint) SetDefaults() { func (r *RedirectEntryPoint) SetDefaults() {
r.Scheme = "https" r.Scheme = "https"
r.Permanent = true r.Permanent = true
r.Priority = math.MaxInt32 r.Priority = math.MaxInt32
} }
// TLSConfig is the default TLS configuration for all the routers associated to the concerned entry point. // TLSConfig is the default TLS configuration for all the routers associated to the concerned entry point.
type TLSConfig struct { type TLSConfig struct {
Options string `description:"Default TLS options for the rou Options string `description:"Default TLS options for the rou
ters linked to the entry point." json:"options,omitempty" toml:"options,omitempt ters linked to the entry point." json:"options,omitempty" toml:"options,omitempt
y" yaml:"options,omitempty"` y" yaml:"options,omitempty" export:"true"`
CertResolver string `description:"Default certificate resolver fo CertResolver string `description:"Default certificate resolver fo
r the routers linked to the entry point." json:"certResolver,omitempty" toml:"ce r the routers linked to the entry point." json:"certResolver,omitempty" toml:"ce
rtResolver,omitempty" yaml:"certResolver,omitempty"` rtResolver,omitempty" yaml:"certResolver,omitempty" export:"true"`
Domains []types.Domain `description:"Default TLS domains for the rou Domains []types.Domain `description:"Default TLS domains for the rou
ters linked to the entry point." json:"domains,omitempty" toml:"domains,omitempt ters linked to the entry point." json:"domains,omitempty" toml:"domains,omitempt
y" yaml:"domains,omitempty"` y" yaml:"domains,omitempty" export:"true"`
} }
// ForwardedHeaders Trust client forwarding headers. // ForwardedHeaders Trust client forwarding headers.
type ForwardedHeaders struct { type ForwardedHeaders struct {
Insecure bool `description:"Trust all forwarded headers." json:"ins ecure,omitempty" toml:"insecure,omitempty" yaml:"insecure,omitempty" export:"tru e"` Insecure bool `description:"Trust all forwarded headers." json:"ins ecure,omitempty" toml:"insecure,omitempty" yaml:"insecure,omitempty" export:"tru e"`
TrustedIPs []string `description:"Trust only forwarded headers from selec ted IPs." json:"trustedIPs,omitempty" toml:"trustedIPs,omitempty" yaml:"trustedI Ps,omitempty"` TrustedIPs []string `description:"Trust only forwarded headers from selec ted IPs." json:"trustedIPs,omitempty" toml:"trustedIPs,omitempty" yaml:"trustedI Ps,omitempty"`
} }
// ProxyProtocol contains Proxy-Protocol configuration. // ProxyProtocol contains Proxy-Protocol configuration.
type ProxyProtocol struct { type ProxyProtocol struct {
 End of changes. 5 change blocks. 
37 lines changed or deleted 41 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)