Fix regexp handling in redirect middleware
This commit is contained in:
parent
ad3625bef3
commit
232e2c1e7d
3 changed files with 8 additions and 16 deletions
|
@ -15,6 +15,8 @@ const (
|
|||
schemeHTTPS = "https"
|
||||
)
|
||||
|
||||
var uriRegexp = regexp.MustCompile(`^(https?):\/\/(\[[\w:.]+\]|[\w\._-]+)?(:\d+)?(.*)$`)
|
||||
|
||||
type redirect struct {
|
||||
next http.Handler
|
||||
regex *regexp.Regexp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue