Add SSLForceHost support.
This commit is contained in:
parent
dce65ab9c2
commit
b7d20496f3
37 changed files with 389 additions and 40 deletions
|
@ -119,14 +119,16 @@ type RateLimit struct {
|
|||
|
||||
// Headers holds the custom header configuration
|
||||
type Headers struct {
|
||||
CustomRequestHeaders map[string]string `json:"customRequestHeaders,omitempty"`
|
||||
CustomResponseHeaders map[string]string `json:"customResponseHeaders,omitempty"`
|
||||
CustomRequestHeaders map[string]string `json:"customRequestHeaders,omitempty"`
|
||||
CustomResponseHeaders map[string]string `json:"customResponseHeaders,omitempty"`
|
||||
|
||||
AllowedHosts []string `json:"allowedHosts,omitempty"`
|
||||
HostsProxyHeaders []string `json:"hostsProxyHeaders,omitempty"`
|
||||
SSLRedirect bool `json:"sslRedirect,omitempty"`
|
||||
SSLTemporaryRedirect bool `json:"sslTemporaryRedirect,omitempty"`
|
||||
SSLHost string `json:"sslHost,omitempty"`
|
||||
SSLProxyHeaders map[string]string `json:"sslProxyHeaders,omitempty"`
|
||||
SSLForceHost bool `json:"sslForceHost,omitempty"`
|
||||
STSSeconds int64 `json:"stsSeconds,omitempty"`
|
||||
STSIncludeSubdomains bool `json:"stsIncludeSubdomains,omitempty"`
|
||||
STSPreload bool `json:"stsPreload,omitempty"`
|
||||
|
@ -154,6 +156,7 @@ func (h *Headers) HasSecureHeadersDefined() bool {
|
|||
len(h.HostsProxyHeaders) != 0 ||
|
||||
h.SSLRedirect ||
|
||||
h.SSLTemporaryRedirect ||
|
||||
h.SSLForceHost ||
|
||||
h.SSLHost != "" ||
|
||||
len(h.SSLProxyHeaders) != 0 ||
|
||||
h.STSSeconds != 0 ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue