Add SSLForceHost support.
This commit is contained in:
parent
dce65ab9c2
commit
b7d20496f3
37 changed files with 389 additions and 40 deletions
|
@ -53,6 +53,7 @@ const (
|
|||
pathFrontendCustomResponseHeaders = "/headers/customresponseheaders/"
|
||||
pathFrontendAllowedHosts = "/headers/allowedhosts"
|
||||
pathFrontendHostsProxyHeaders = "/headers/hostsproxyheaders"
|
||||
pathFrontendSSLForceHost = "/headers/sslforcehost"
|
||||
pathFrontendSSLRedirect = "/headers/sslredirect"
|
||||
pathFrontendSSLTemporaryRedirect = "/headers/ssltemporaryredirect"
|
||||
pathFrontendSSLHost = "/headers/sslhost"
|
||||
|
|
|
@ -226,6 +226,7 @@ func (p *Provider) getHeaders(rootPath string) *types.Headers {
|
|||
SSLProxyHeaders: p.getMap(rootPath, pathFrontendSSLProxyHeaders),
|
||||
AllowedHosts: p.getList("", rootPath, pathFrontendAllowedHosts),
|
||||
HostsProxyHeaders: p.getList(rootPath, pathFrontendHostsProxyHeaders),
|
||||
SSLForceHost: p.getBool(false, rootPath, pathFrontendSSLForceHost),
|
||||
SSLRedirect: p.getBool(false, rootPath, pathFrontendSSLRedirect),
|
||||
SSLTemporaryRedirect: p.getBool(false, rootPath, pathFrontendSSLTemporaryRedirect),
|
||||
SSLHost: p.get("", rootPath, pathFrontendSSLHost),
|
||||
|
|
|
@ -121,6 +121,7 @@ func TestProviderBuildConfiguration(t *testing.T) {
|
|||
withPair(pathFrontendPublicKey, "foo"),
|
||||
withPair(pathFrontendReferrerPolicy, "foo"),
|
||||
withPair(pathFrontendCustomBrowserXSSValue, "foo"),
|
||||
withPair(pathFrontendSSLForceHost, "true"),
|
||||
withPair(pathFrontendSSLRedirect, "true"),
|
||||
withPair(pathFrontendSSLTemporaryRedirect, "true"),
|
||||
withPair(pathFrontendSTSIncludeSubdomains, "true"),
|
||||
|
@ -254,6 +255,7 @@ func TestProviderBuildConfiguration(t *testing.T) {
|
|||
PublicKey: "foo",
|
||||
ReferrerPolicy: "foo",
|
||||
CustomBrowserXSSValue: "foo",
|
||||
SSLForceHost: true,
|
||||
SSLRedirect: true,
|
||||
SSLTemporaryRedirect: true,
|
||||
STSIncludeSubdomains: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue