refactor: fix some code.
This commit is contained in:
parent
07524f5c99
commit
0472d19bd4
15 changed files with 71 additions and 15 deletions
|
@ -1133,6 +1133,9 @@ func (s *Server) loadConfig(configurations types.Configurations, globalConfigura
|
|||
}
|
||||
|
||||
regex, replacement, err := s.buildRedirect(proto, entryPoint)
|
||||
if err != nil {
|
||||
log.Fatalf("Error creating Frontend Redirect: %v", err)
|
||||
}
|
||||
rewrite, err := middlewares.NewRewrite(regex, replacement, true)
|
||||
if err != nil {
|
||||
log.Fatalf("Error creating Frontend Redirect: %v", err)
|
||||
|
@ -1298,6 +1301,9 @@ func (s *Server) loadEntryPointConfig(entryPointName string, entryPoint *configu
|
|||
protocol = "https"
|
||||
}
|
||||
regex, replacement, err = s.buildRedirect(protocol, entryPoint)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
rewrite, err := middlewares.NewRewrite(regex, replacement, true)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue