mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 19:08:58 +00:00
cmd/syncthing: Return "Forbidden" for REST API debug endpoints when debugging disabled
The previous "Bad Request" was really confusing as it implies it's somethign wrong with the request, which there isn't - the problem is that server configuration forbids the request.
This commit is contained in:
parent
b19885fdb3
commit
84494edab4
@ -592,7 +592,7 @@ func (s *apiService) whenDebugging(h http.Handler) http.Handler {
|
||||
return
|
||||
}
|
||||
|
||||
http.Error(w, "Debugging disabled", http.StatusBadRequest)
|
||||
http.Error(w, "Debugging disabled", http.StatusForbidden)
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user