mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-09 19:52:30 +02:00
Add development errors mode
This commit is contained in:
@@ -175,7 +175,12 @@ func respondWithError(reqID string, rw http.ResponseWriter, err *imgproxyError)
|
||||
logResponse(reqID, err.StatusCode, err.Message)
|
||||
|
||||
rw.WriteHeader(err.StatusCode)
|
||||
rw.Write([]byte(err.PublicMessage))
|
||||
|
||||
if conf.DevelopmentErrorsMode {
|
||||
rw.Write([]byte(err.Message))
|
||||
} else {
|
||||
rw.Write([]byte(err.PublicMessage))
|
||||
}
|
||||
}
|
||||
|
||||
func respondWithOptions(reqID string, rw http.ResponseWriter) {
|
||||
|
Reference in New Issue
Block a user