Fix proxy navigation bug
alex wennerberg alex@alexwennerberg.com
Mon, 01 Feb 2021 18:32:12 -0800
3 files changed,
5 insertions(+),
3 deletions(-)
M
http.go
→
http.go
@@ -594,8 +594,9 @@ SiteBody template.HTML
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)
M
proxy.go
→
proxy.go
@@ -120,9 +120,10 @@ data := struct {
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 {
M
templates/user_page.html
→
templates/user_page.html
@@ -25,7 +25,7 @@ {{ end }}
<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>