From cd2a6a963c3841fcd83e5e2910dfa4d9241c97f9 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Sun, 14 Mar 2021 14:42:19 -0400 Subject: Block /quit on non-local machines --- cmd/web/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/web') diff --git a/cmd/web/main.go b/cmd/web/main.go index 875b2d8..45b64ae 100644 --- a/cmd/web/main.go +++ b/cmd/web/main.go @@ -44,7 +44,7 @@ func main() { r := mux.NewRouter() - r.HandleFunc("/quit", HandleQuit) + r.Handle("/quit", UnauthorizedIfNotLocal(http.HandlerFunc(HandleQuit))) r.Handle("/setLib", UnauthorizedIfNotLocal(http.HandlerFunc(a.HandleSetLib))) r.Handle("/delete", UnauthorizedIfNotLocal(http.HandlerFunc(a.HandleDelete))) r.Handle("/install", UnauthorizedIfNotLocal(http.HandlerFunc(a.HandleInstall))) -- cgit v1.2.3