flounder

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

commit b1fa8cb01f71328091f20fe0acc1c8fb2ca9483f
parent f63edd7303f49c0919c3009b93c93e6009f4e873
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Mon,  1 Feb 2021 18:32:12 -0800

Fix proxy navigation bug

Diffstat:
Mhttp.go | 3++-
Mproxy.go | 3++-
Mtemplates/user_page.html | 2+-
3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/http.go b/http.go @@ -594,8 +594,9 @@ func userFile(w http.ResponseWriter, r *http.Request) { Favicon string PageTitle string URI *url.URL + GeminiURI *url.URL Config Config - }{template.HTML(htmlString), favicon, userName + p, &uri, c} + }{template.HTML(htmlString), favicon, userName + p, &uri, &uri, c} err = t.ExecuteTemplate(w, "user_page.html", data) if err != nil { panic(err) diff --git a/proxy.go b/proxy.go @@ -120,9 +120,10 @@ func proxyGemini(w http.ResponseWriter, r *http.Request) { SiteBody template.HTML Favicon string PageTitle string + GeminiURI *url.URL URI *url.URL Config Config - }{template.HTML(htmlString), "", r.URL.String(), req.URL, c} + }{template.HTML(htmlString), "", r.URL.String(), req.URL, r.URL, c} err = t.ExecuteTemplate(w, "user_page.html", data) if err != nil { diff --git a/templates/user_page.html b/templates/user_page.html @@ -25,7 +25,7 @@ <div class="footer"> <details> <summary>Proxy</summary> - Proxied from the original at <a href="{{safeGeminiURL .URI.String}}">{{.URI.String}}</a> + Proxied from the original at <a href="{{safeGeminiURL .GeminiURI.String}}">{{.GeminiURI.String}}</a> <br> <a href="https://admin.flounder.online/gemini.gmi">About Gemini</a> <br>