Fix index.gmi CGI for user subdomain request

Excuse, more temp fixes
This commit is contained in:
hedy 2022-05-08 18:34:22 +08:00
parent 60977f6963
commit 8995bd4fac
Signed by: hedy
GPG Key ID: B51B5A8D1B176372
1 changed files with 1 additions and 1 deletions

View File

@ -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"