Add redirect things for dumb js apps

master
Bel LaPointe 2020-07-25 02:28:57 -06:00
parent ec1e0cdf2e
commit 1af274dc1d
1 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@ import (
"net"
"net/http"
"net/url"
"path"
"strings"
"time"
@ -131,7 +132,7 @@ func (s *Server) doAuth(foo http.HandlerFunc) http.HandlerFunc {
return
}
}
if config.GetNoPath(key) {
if config.GetNoPath(key) && path.Ext(r.URL.Path) == "" {
r.URL.Path = "/"
}
foo(w, r)