From 8995bd4facf9b9b1660e6fd40a65ff2969382f7b Mon Sep 17 00:00:00 2001 From: hedy Date: Sun, 8 May 2022 18:34:22 +0800 Subject: [PATCH] Fix index.gmi CGI for user subdomain request Excuse, more temp fixes --- spsrv.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spsrv.go b/spsrv.go index 141631e..46e253b 100644 --- a/spsrv.go +++ b/spsrv.go @@ -209,7 +209,7 @@ func handleConnection(netConn net.Conn, conf *Config) { if req.user != "" && (!conf.UserCGIEnable || !conf.UserDirEnable) { break } - if req.user != "" && req.filePath == "" { + if req.user != "" && (req.filePath == "" || req.filePath == "/") { // TODO: Refactor - ATM `path` would contain the current CGI file wanted // But for hitting /~user/, req.filePath is NOT index.gmi req.filePath = "index.gmi"