This commit is contained in:
Umputun
2018-02-14 03:22:14 -06:00
parent 2b1ad47e74
commit e589e4aa70
+1 -1
View File
@@ -422,7 +422,7 @@ func (s *Server) addFileServer(r chi.Router, path string, root http.FileSystem)
r.Get(path, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// don't show dirs, just serve files
if strings.HasSuffix(r.URL.Path, "/") && len(r.URL.Path) > 1 && r.URL.Path != (path+"/") {
if strings.HasSuffix(r.URL.Path, "/") && len(r.URL.Path) > 1 && r.URL.Path != "/web/" {
http.NotFound(w, r)
return
}