Merge pull request #95 from fossyy/staging

Prevent overlapping default 404 message with custom HTML content
This commit is contained in:
2024-10-08 14:05:43 +07:00
committed by GitHub

View File

@ -32,6 +32,9 @@ import (
func SetupRoutes() *http.ServeMux {
handler := http.NewServeMux()
handler.HandleFunc("GET /{$}", indexHandler.GET)
handler.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotFound)
})
authRoute := http.NewServeMux()
handler.Handle("/auth/", http.StripPrefix("/auth", authRoute))