summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRose Hogenson <rosehogenson@posteo.net>2024-10-17 11:48:23 -0700
committerRose Hogenson <rosehogenson@posteo.net>2024-10-17 11:48:23 -0700
commit64620f3770e24de6894b06d28f73017ba0d6d868 (patch)
tree1e37a8d2ddceda58d6faf54d9e796b5372307096
parentad71e55afa46b0bd2a19e31a6838d86dfcd3bd9a (diff)
downloadroseh.moe-64620f3770e24de6894b06d28f73017ba0d6d868.tar.zst
Add more logging
-rw-r--r--roseh.moe.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/roseh.moe.go b/roseh.moe.go
index 42c854a..91b8ebd 100644
--- a/roseh.moe.go
+++ b/roseh.moe.go
@@ -49,6 +49,10 @@ func main() {
http.HandleFunc("GET /{$}", s.index)
http.HandleFunc("/cinema", s.cinema)
http.HandleFunc("/cinema/", s.cinema)
+ http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
+ log.Printf("invalid path %#v", r)
+ http.Error(w, "not found", http.StatusNotFound)
+ })
addr := fmt.Sprintf(":%d", *port)
log.Printf("Listening on %q", addr)