flounder

A simple gemini site builder
Log | Files | Refs | README | LICENSE

commit a6c4ff2be3076c8747909dad18d29d37f8d0caab
parent ef9c8adee1863a8ce60471c6b8ad3705d817d303
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Thu, 18 Nov 2021 20:28:58 -0800

Rely on built in go-gemini servefile

Diffstat:
Mgemini.go | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/gemini.go b/gemini.go @@ -93,9 +93,7 @@ func gmiPage(_ context.Context, w gmi.ResponseWriter, r *gmi.Request) { userName = filepath.Clean(strings.Split(r.URL.Host, ".")[0]) // clean probably unnecessary } fileName := filepath.Clean(r.URL.Path) - if fileName == "/" { - fileName = "index.gmi" - } else if strings.HasPrefix(fileName, "/"+HiddenFolder) { + if strings.HasPrefix(fileName, "/"+HiddenFolder) { w.WriteHeader(gmi.StatusNotFound, "Not found") return }