flounder

A simple gemini site builder
git clone git://git.alexwennerberg.com/flounder
Log | Files | Refs | README | LICENSE

commit 17a218f58587529ebd4f5365a9d0e890e849baaf
parent fc812776ab94953fccb2c7cfe14d51a3eb022fbd
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sun,  3 Apr 2022 15:55:35 -0700

hacky hack

Diffstat:
Mconfig.go | 1+
Mgemini.go | 4++++
2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/config.go b/config.go @@ -16,6 +16,7 @@ type Config struct { HttpPort int SiteTitle string Debug bool + Hack bool // No one else uses this code. I will try to box hacks within this bool SecretKey string DBFile string AnalyticsDBFile string diff --git a/gemini.go b/gemini.go @@ -97,6 +97,10 @@ func gmiPage(_ context.Context, w gmi.ResponseWriter, r *gmi.Request) { return } fullPath := path.Join(c.FilesDirectory, userName, fileName) + // hack + if c.Hack && userName == "lists" { + fullPath = "/www/crabmail" + } if fileName == "/gemlog" { // temp hack _, err := os.Stat(path.Join(fullPath, "index.gmi")) if err != nil {