Skip to content

Commit

Permalink
Merge pull request #947 from containous/fix-redirect-regex
Browse files Browse the repository at this point in the history
Fix redirect regex
  • Loading branch information
emilevauge committed Dec 9, 2016
2 parents 7f3ae6e + 8156082 commit 70f39c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ func (server *Server) loadEntryPointConfig(entryPointName string, entryPoint *En
regex := entryPoint.Redirect.Regex
replacement := entryPoint.Redirect.Replacement
if len(entryPoint.Redirect.EntryPoint) > 0 {
regex = "^(?:https?:\\/\\/)?([\\da-z\\.-]+)(?::\\d+)?(.*)$"
regex = "^(?:https?:\\/\\/)?([\\w\\._-]+)(?::\\d+)?(.*)$"
if server.globalConfiguration.EntryPoints[entryPoint.Redirect.EntryPoint] == nil {
return nil, errors.New("Unknown entrypoint " + entryPoint.Redirect.EntryPoint)
}
Expand Down

0 comments on commit 70f39c3

Please sign in to comment.