diff --git a/main.go b/main.go index 4a0bbd120136655c4d41e369c90f9fc4f3464d37..9352de01ec1c2d0fce9ebbc8e820a414aa29586e 100644 --- a/main.go +++ b/main.go @@ -6,7 +6,6 @@ import ( "html/template" "log" "net/http" - "os" "strconv" "github.com/jmoiron/sqlx" @@ -34,17 +33,6 @@ func main() { http.Handle("/static/", http.FileServer(http.FS(staticFS))) - http.HandleFunc("/debug/quit", func(w http.ResponseWriter, r *http.Request) { - if r.Method != "POST" { - http.Error(w, "invalid method:"+r.Method, http.StatusMethodNotAllowed) - return - } - - log.Println("exit requested by", r.RemoteAddr) - - os.Exit(0) - }) - http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { log.Println("handling", r.Method, r.URL, "from", r.RemoteAddr) diff --git a/templates/index.tpl b/templates/index.tpl index 187238e8d5ffd0267ac077d25386c98e8542c922..e46b4bf4e5258c7526726f9a3721688fe2acd1d2 100644 --- a/templates/index.tpl +++ b/templates/index.tpl @@ -23,9 +23,5 @@ </table> <p>And a bit of foo.</p> - <hr/> - <form method="POST" action="/debug/quit"> - <button type="submit">Kill server</button> - </form> </body> </html> \ No newline at end of file