Merge v1.5.4 into master
This commit is contained in:
parent
8d468925d3
commit
526c19181e
10 changed files with 92 additions and 32 deletions
|
@ -22,28 +22,29 @@ const (
|
|||
pathBackendBufferingMemRequestBodyBytes = pathBackendBuffering + "memrequestbodybytes"
|
||||
pathBackendBufferingRetryExpression = pathBackendBuffering + "retryexpression"
|
||||
|
||||
pathFrontends = "/frontends/"
|
||||
pathFrontendBackend = "/backend"
|
||||
pathFrontendPriority = "/priority"
|
||||
pathFrontendPassHostHeader = "/passHostHeader"
|
||||
pathFrontendPassTLSCert = "/passtlscert"
|
||||
pathFrontendWhiteListSourceRange = "/whitelistsourcerange"
|
||||
pathFrontendBasicAuth = "/basicauth"
|
||||
pathFrontendEntryPoints = "/entrypoints"
|
||||
pathFrontendRedirectEntryPoint = "/redirect/entrypoint"
|
||||
pathFrontendRedirectRegex = "/redirect/regex"
|
||||
pathFrontendRedirectReplacement = "/redirect/replacement"
|
||||
pathFrontendRedirectPermanent = "/redirect/permanent"
|
||||
pathFrontendErrorPages = "/errors/"
|
||||
pathFrontendErrorPagesBackend = "/backend"
|
||||
pathFrontendErrorPagesQuery = "/query"
|
||||
pathFrontendErrorPagesStatus = "/status"
|
||||
pathFrontendRateLimit = "/ratelimit/"
|
||||
pathFrontendRateLimitRateSet = pathFrontendRateLimit + "rateset/"
|
||||
pathFrontendRateLimitExtractorFunc = pathFrontendRateLimit + "extractorfunc"
|
||||
pathFrontendRateLimitPeriod = "/period"
|
||||
pathFrontendRateLimitAverage = "/average"
|
||||
pathFrontendRateLimitBurst = "/burst"
|
||||
pathFrontends = "/frontends/"
|
||||
pathFrontendBackend = "/backend"
|
||||
pathFrontendPriority = "/priority"
|
||||
pathFrontendPassHostHeaderDeprecated = "/passHostHeader" // Deprecated
|
||||
pathFrontendPassHostHeader = "/passhostheader"
|
||||
pathFrontendPassTLSCert = "/passtlscert"
|
||||
pathFrontendWhiteListSourceRange = "/whitelistsourcerange"
|
||||
pathFrontendBasicAuth = "/basicauth"
|
||||
pathFrontendEntryPoints = "/entrypoints"
|
||||
pathFrontendRedirectEntryPoint = "/redirect/entrypoint"
|
||||
pathFrontendRedirectRegex = "/redirect/regex"
|
||||
pathFrontendRedirectReplacement = "/redirect/replacement"
|
||||
pathFrontendRedirectPermanent = "/redirect/permanent"
|
||||
pathFrontendErrorPages = "/errors/"
|
||||
pathFrontendErrorPagesBackend = "/backend"
|
||||
pathFrontendErrorPagesQuery = "/query"
|
||||
pathFrontendErrorPagesStatus = "/status"
|
||||
pathFrontendRateLimit = "/ratelimit/"
|
||||
pathFrontendRateLimitRateSet = pathFrontendRateLimit + "rateset/"
|
||||
pathFrontendRateLimitExtractorFunc = pathFrontendRateLimit + "extractorfunc"
|
||||
pathFrontendRateLimitPeriod = "/period"
|
||||
pathFrontendRateLimitAverage = "/average"
|
||||
pathFrontendRateLimitBurst = "/burst"
|
||||
|
||||
pathFrontendCustomRequestHeaders = "/headers/customrequestheaders/"
|
||||
pathFrontendCustomResponseHeaders = "/headers/customresponseheaders/"
|
||||
|
|
|
@ -42,8 +42,8 @@ func (p *Provider) buildConfiguration() *types.Configuration {
|
|||
|
||||
// Frontend functions
|
||||
"getBackendName": p.getFuncString(pathFrontendBackend, ""),
|
||||
"getPriority": p.getFuncInt(pathFrontendPriority, 0),
|
||||
"getPassHostHeader": p.getFuncBool(pathFrontendPassHostHeader, true),
|
||||
"getPriority": p.getFuncInt(pathFrontendPriority, label.DefaultFrontendPriorityInt),
|
||||
"getPassHostHeader": p.getPassHostHeader(),
|
||||
"getPassTLSCert": p.getFuncBool(pathFrontendPassTLSCert, label.DefaultPassTLSCert),
|
||||
"getEntryPoints": p.getFuncList(pathFrontendEntryPoints),
|
||||
"getWhitelistSourceRange": p.getFuncList(pathFrontendWhiteListSourceRange),
|
||||
|
@ -80,6 +80,24 @@ func (p *Provider) buildConfiguration() *types.Configuration {
|
|||
return configuration
|
||||
}
|
||||
|
||||
// Deprecated
|
||||
func (p *Provider) getPassHostHeader() func(rootPath string) bool {
|
||||
return func(rootPath string) bool {
|
||||
rawValue := p.get("", rootPath, pathFrontendPassHostHeader)
|
||||
|
||||
if len(rawValue) > 0 {
|
||||
value, err := strconv.ParseBool(rawValue)
|
||||
if err != nil {
|
||||
log.Errorf("Invalid value for %s %s: %s", rootPath, pathFrontendPassHostHeader, rawValue)
|
||||
return label.DefaultPassHostHeaderBool
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
return p.getBool(label.DefaultPassHostHeaderBool, rootPath, pathFrontendPassHostHeaderDeprecated)
|
||||
}
|
||||
}
|
||||
|
||||
// Deprecated
|
||||
func (p *Provider) getSticky(rootPath string) bool {
|
||||
stickyValue := p.get("", rootPath, pathBackendLoadBalancerSticky)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue