Allow multiple secure middlewares to operate independently

This commit is contained in:
Daniel Tomcej 2020-07-01 01:42:04 -07:00 committed by GitHub
parent cb1d0441e9
commit 73513f8371
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 99 additions and 11 deletions

View file

@ -167,7 +167,9 @@ func TestSSLForceHost(t *testing.T) {
SSLRedirect: true,
SSLForceHost: true,
SSLHost: "powpow.example.com",
}),
},
"mymiddleware",
),
expected: http.StatusMovedPermanently,
},
{
@ -177,7 +179,9 @@ func TestSSLForceHost(t *testing.T) {
SSLRedirect: true,
SSLForceHost: true,
SSLHost: "powpow.example.com",
}),
},
"mymiddleware",
),
expected: http.StatusMovedPermanently,
},
{
@ -187,7 +191,9 @@ func TestSSLForceHost(t *testing.T) {
SSLRedirect: true,
SSLForceHost: true,
SSLHost: "powpow.example.com",
}),
},
"mymiddleware",
),
expected: http.StatusOK,
},
{
@ -197,7 +203,9 @@ func TestSSLForceHost(t *testing.T) {
SSLRedirect: true,
SSLForceHost: true,
SSLHost: "powpow.example.com",
}),
},
"mymiddleware",
),
expected: http.StatusMovedPermanently,
},
{
@ -207,7 +215,9 @@ func TestSSLForceHost(t *testing.T) {
SSLRedirect: true,
SSLForceHost: false,
SSLHost: "powpow.example.com",
}),
},
"mymiddleware",
),
expected: http.StatusMovedPermanently,
},
{
@ -217,7 +227,9 @@ func TestSSLForceHost(t *testing.T) {
SSLRedirect: true,
SSLForceHost: false,
SSLHost: "powpow.example.com",
}),
},
"mymiddleware",
),
expected: http.StatusOK,
},
}