mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 20:36:12 +02:00
enhance: Log appsec error on writing response to remediation (#3412)
* enhance: Log appsec error on writing response to remediation * fix: note to self dont write code at midnight
This commit is contained in:
parent
49fb24c3b1
commit
7d12b806cd
1 changed files with 3 additions and 1 deletions
|
@ -446,6 +446,8 @@ func (w *AppsecSource) appsecHandler(rw http.ResponseWriter, r *http.Request) {
|
|||
logger.Errorf("unable to serialize response: %s", err)
|
||||
rw.WriteHeader(http.StatusInternalServerError)
|
||||
} else {
|
||||
rw.Write(body)
|
||||
if _, err := rw.Write(body); err != nil {
|
||||
logger.Errorf("unable to write response: %s", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue