From 1af274dc1d748b17f41bb59f27b9699f0f1e9e88 Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Sat, 25 Jul 2020 02:28:57 -0600 Subject: [PATCH] Add redirect things for dumb js apps --- server/server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/server.go b/server/server.go index 9f8a9d4..27c08dd 100755 --- a/server/server.go +++ b/server/server.go @@ -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)