Add SSLForceHost support.
This commit is contained in:
parent
dce65ab9c2
commit
b7d20496f3
37 changed files with 389 additions and 40 deletions
|
@ -209,6 +209,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
withLabel(label.TraefikFrontendSSLProxyHeaders, "Access-Control-Allow-Methods:POST,GET,OPTIONS || Content-type: application/json; charset=utf-8"),
|
||||
withLabel(label.TraefikFrontendAllowedHosts, "foo,bar,bor"),
|
||||
withLabel(label.TraefikFrontendHostsProxyHeaders, "foo,bar,bor"),
|
||||
withLabel(label.TraefikFrontendSSLForceHost, "true"),
|
||||
withLabel(label.TraefikFrontendSSLHost, "foo"),
|
||||
withLabel(label.TraefikFrontendCustomFrameOptionsValue, "foo"),
|
||||
withLabel(label.TraefikFrontendContentSecurityPolicy, "foo"),
|
||||
|
@ -285,6 +286,7 @@ func TestBuildConfiguration(t *testing.T) {
|
|||
},
|
||||
SSLRedirect: true,
|
||||
SSLTemporaryRedirect: true,
|
||||
SSLForceHost: true,
|
||||
SSLHost: "foo",
|
||||
SSLProxyHeaders: map[string]string{
|
||||
"Access-Control-Allow-Methods": "POST,GET,OPTIONS",
|
||||
|
@ -581,6 +583,7 @@ func TestBuildConfigurationSegments(t *testing.T) {
|
|||
withSegmentLabel(label.TraefikFrontendSSLProxyHeaders, "Access-Control-Allow-Methods:POST,GET,OPTIONS || Content-type: application/json; charset=utf-8", "containous"),
|
||||
withSegmentLabel(label.TraefikFrontendAllowedHosts, "foo,bar,bor", "containous"),
|
||||
withSegmentLabel(label.TraefikFrontendHostsProxyHeaders, "foo,bar,bor", "containous"),
|
||||
withSegmentLabel(label.TraefikFrontendSSLForceHost, "true", "containous"),
|
||||
withSegmentLabel(label.TraefikFrontendSSLHost, "foo", "containous"),
|
||||
withSegmentLabel(label.TraefikFrontendCustomFrameOptionsValue, "foo", "containous"),
|
||||
withSegmentLabel(label.TraefikFrontendContentSecurityPolicy, "foo", "containous"),
|
||||
|
@ -657,6 +660,7 @@ func TestBuildConfigurationSegments(t *testing.T) {
|
|||
},
|
||||
SSLRedirect: true,
|
||||
SSLTemporaryRedirect: true,
|
||||
SSLForceHost: true,
|
||||
SSLHost: "foo",
|
||||
SSLProxyHeaders: map[string]string{
|
||||
"Access-Control-Allow-Methods": "POST,GET,OPTIONS",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue