1
0
Fork 0

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:
Traefiker Bot 2020-03-05 12:46:05 +01:00 committed by GitHub
parent 93a7af270f
commit a6040c623b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 1016 additions and 126 deletions

View file

@ -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 {