From 11c0e0ca37ce58d74f3cd5831265b9912f6bc8ea Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Fri, 8 Jan 2021 22:25:55 -0500 Subject: Make the application a bit more user friendly Make a split between being accessed over loopback and remotely. Attempt to show the IP of the server on the internal page to make it easy to hand out. Remove the ability to change any of the runtime configuration or quit the program unless you're local. --- cmd/web/delete.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd/web/delete.go') diff --git a/cmd/web/delete.go b/cmd/web/delete.go index 5bf747e..8edd6c6 100644 --- a/cmd/web/delete.go +++ b/cmd/web/delete.go @@ -6,6 +6,10 @@ import ( ) func gameDelete(w http.ResponseWriter, r *http.Request) { + if unauthorizedIfNotLocal(w, r) { + return + } + err := r.ParseForm() if err != nil { Logger.Printf("Installer: While parsing form: %s", err) -- cgit v1.2.3