404 instead of 403

This commit is contained in:
Ian Gulliver
2024-12-02 23:03:48 -08:00
parent 9648518a69
commit 1e9cc7516f

View File

@@ -97,7 +97,7 @@ func (sl *ShortLinks) serveRootWithPath(w http.ResponseWriter, r *http.Request,
log.Printf("%s %s %s %s %s", r.RemoteAddr, r.Method, r.Host, sl.getDomain(r.Host), r.URL)
if !sl.isWritable(r.Host) {
sendError(w, http.StatusForbidden, "not writable")
sendError(w, http.StatusNotFound, "not found")
return
}
@@ -136,7 +136,7 @@ func (sl *ShortLinks) serveSet(w http.ResponseWriter, r *http.Request) {
log.Printf("%s %s %s %s %s", r.RemoteAddr, r.Method, r.Host, sl.getDomain(r.Host), r.URL)
if !sl.isWritable(r.Host) {
sendError(w, http.StatusForbidden, "not writable")
sendError(w, http.StatusNotFound, "not found")
return
}
@@ -180,7 +180,7 @@ func (sl *ShortLinks) serveSuggest(w http.ResponseWriter, r *http.Request) {
log.Printf("%s %s %s %s %s", r.RemoteAddr, r.Method, r.Host, sl.getDomain(r.Host), r.URL)
if !sl.isWritable(r.Host) {
sendError(w, http.StatusForbidden, "not writable")
sendError(w, http.StatusNotFound, "not found")
return
}