Allow multiple secure middlewares to operate independently
This commit is contained in:
parent
cb1d0441e9
commit
73513f8371
7 changed files with 99 additions and 11 deletions
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue