flounder

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

commit 268a068078b3b2296fb456fdb4f4699fc332cfb9
parent 832bd12921a131206263bf1374e07b5164b1c143
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sun, 31 Oct 2021 00:33:42 -0700

add root hostname

Diffstat:
Mgemini.go | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gemini.go b/gemini.go @@ -81,7 +81,7 @@ func gmiIndex(w gmi.ResponseWriter, r *gmi.Request) { func gmiPage(_ context.Context, w gmi.ResponseWriter, r *gmi.Request) { // redundant hostname := strings.SplitN(c.Host, ":", 2)[0] - if strings.HasPrefix(r.Host, hostname) { + if r.URL.Host == hostname { gmiIndex(w, r) return } @@ -136,6 +136,7 @@ func runGeminiServer() { // is this necc? certificates := &certificate.Store{} certificates.Register("*." + hostname) + certificates.Register(hostname) server.GetCertificate = certificates.Get var mux gmi.Mux