mirror of
https://github.com/containous/traefik.git
synced 2024-12-23 17:34:13 +03:00
Merge pull request #247 from containous/fix-redirect-bug
fixes redirect bug en port 80
This commit is contained in:
commit
4c447985b6
@ -442,7 +442,7 @@ func (server *Server) loadEntryPointConfig(entryPointName string, entryPoint *En
|
|||||||
regex := entryPoint.Redirect.Regex
|
regex := entryPoint.Redirect.Regex
|
||||||
replacement := entryPoint.Redirect.Replacement
|
replacement := entryPoint.Redirect.Replacement
|
||||||
if len(entryPoint.Redirect.EntryPoint) > 0 {
|
if len(entryPoint.Redirect.EntryPoint) > 0 {
|
||||||
regex = "^(?:https?:\\/\\/)?([\\da-z\\.-]+)(?::\\d+)(.*)$"
|
regex = "^(?:https?:\\/\\/)?([\\da-z\\.-]+)(?::\\d+)?(.*)$"
|
||||||
if server.globalConfiguration.EntryPoints[entryPoint.Redirect.EntryPoint] == nil {
|
if server.globalConfiguration.EntryPoints[entryPoint.Redirect.EntryPoint] == nil {
|
||||||
return nil, errors.New("Unknown entrypoint " + entryPoint.Redirect.EntryPoint)
|
return nil, errors.New("Unknown entrypoint " + entryPoint.Redirect.EntryPoint)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user