Add configoption to exclude routes from tls upgrading (#2203)
* Add configoption to exclude routes from tls upgrading * Add tests for IsLocationInLocationList * Seperate elements in NoTLSRedirectLocations by comma * Set NoTLSRedirectLocations to "/.well-known/acme-challenge/" by default * Remove trailing slash from "/.well-known/acme-challenge" default
This commit is contained in:
parent
977cfcb4c7
commit
94deb3a01a
5 changed files with 60 additions and 1 deletions
|
|
@ -490,6 +490,10 @@ type Configuration struct {
|
|||
SyslogHost string `json:"syslog-host"`
|
||||
// SyslogPort port
|
||||
SyslogPort int `json:"syslog-port",omitempty`
|
||||
|
||||
// NoTLSRedirectLocations is a comma-separated list of locations
|
||||
// that should not get redirected to TLS
|
||||
NoTLSRedirectLocations string `json:"no-tls-redirect-locations"`
|
||||
}
|
||||
|
||||
// NewDefault returns the default nginx configuration
|
||||
|
|
@ -587,6 +591,7 @@ func NewDefault() Configuration {
|
|||
JaegerSamplerParam: "1",
|
||||
LimitReqStatusCode: 503,
|
||||
SyslogPort: 514,
|
||||
NoTLSRedirectLocations: "/.well-known/acme-challenge",
|
||||
}
|
||||
|
||||
if glog.V(5) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue