This commit is contained in:
Solderpunk 2020-07-01 16:19:38 +02:00
parent f4f14320df
commit d87ecfd20f
1 changed files with 1 additions and 1 deletions

View File

@ -249,7 +249,7 @@ func handleRedirectsInner(URL *url.URL, redirects map[string]string, status int,
for src, dst := range redirects {
compiled, err := regexp.Compile(src)
if err != nil {
continue
continue
}
if compiled.MatchString(URL.Path) {
URL.Path = compiled.ReplaceAllString(URL.Path, dst)