flounder

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

commit 5299576a629311f34c8b9807c426924ce866b04d
parent a095e559c9284b15dc4b079c66244b3e1fbee8fb
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sat,  5 Feb 2022 11:53:16 -0800

add deprecation warning for flounder proxy

Diffstat:
Mhttp.go | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/http.go b/http.go @@ -833,6 +833,11 @@ func checkDomainHandler(w http.ResponseWriter, r *http.Request) { http.Error(w, "Not Found", 404) } +func proxyGemini(w http.ResponseWriter, r *http.Request) { + errorMsg := "proxy.flounder.online has been deprecated. Consider using another gemini proxy" + renderError(w, errorMsg, 410) +} + func runHTTPServer() { log.Printf("Running http server with hostname %s on port %d.", c.Host, c.HttpPort) var err error @@ -877,6 +882,8 @@ func runHTTPServer() { wrapped := handlers.CustomLoggingHandler(log.Writer(), serveMux, logFormatter) + // Deprecated + serveMux.HandleFunc("proxy."+hostname+"/", proxyGemini) serveMux.HandleFunc("/", userFile) srv := &http.Server{ ReadTimeout: 5 * time.Second,