chore(server): replace 404 with 401 for unsupported routes and methods

This commit is contained in:
Quentin McGaw
2022-08-21 21:23:02 +00:00
parent f8bf32bb34
commit 54dcf28b31
6 changed files with 13 additions and 13 deletions

View File

@@ -44,7 +44,7 @@ func (h *handlerV1) ServeHTTP(w http.ResponseWriter, r *http.Request) {
h.publicip.ServeHTTP(w, r)
default:
errString := fmt.Sprintf("%s %s not found", r.Method, r.RequestURI)
http.Error(w, errString, http.StatusNotFound)
http.Error(w, errString, http.StatusBadRequest)
}
}