Entry point redirection and default routers configuration
Co-authored-by: Julien Salleyron <julien.salleyron@gmail.com> Co-authored-by: Mathieu Lonjaret <mathieu.lonjaret@gmail.com>
This commit is contained in:
parent
93a7af270f
commit
a6040c623b
46 changed files with 1016 additions and 126 deletions
|
@ -167,6 +167,47 @@ func Test_createConfiguration(t *testing.T) {
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
desc: "models.json",
|
||||
staticCfg: static.Configuration{
|
||||
EntryPoints: map[string]*static.EntryPoint{
|
||||
"websecure": {
|
||||
HTTP: static.HTTPConfig{
|
||||
Middlewares: []string{"test"},
|
||||
TLS: &static.TLSConfig{
|
||||
Options: "opt",
|
||||
CertResolver: "le",
|
||||
Domains: []types.Domain{
|
||||
{Main: "mainA", SANs: []string{"sanA1", "sanA2"}},
|
||||
{Main: "mainB", SANs: []string{"sanB1", "sanB2"}},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
desc: "redirection.json",
|
||||
staticCfg: static.Configuration{
|
||||
EntryPoints: map[string]*static.EntryPoint{
|
||||
"web": {
|
||||
Address: ":80",
|
||||
HTTP: static.HTTPConfig{
|
||||
Redirections: &static.Redirections{
|
||||
EntryPoint: &static.RedirectEntryPoint{
|
||||
To: "websecure",
|
||||
Scheme: "https",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"websecure": {
|
||||
Address: ":443",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range testCases {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue