mirror of
https://github.com/caddyserver/caddy.git
synced 2025-06-06 12:54:40 +08:00
Add maxrequestbody directive (#1163)
This commit is contained in:
@ -268,7 +268,9 @@ func (r *replacer) getSubstitution(key string) string {
|
||||
}
|
||||
_, err := ioutil.ReadAll(r.request.Body)
|
||||
if err != nil {
|
||||
return r.emptyValue
|
||||
if _, ok := err.(MaxBytesExceeded); ok {
|
||||
return r.emptyValue
|
||||
}
|
||||
}
|
||||
return requestReplacer.Replace(r.requestBody.String())
|
||||
case "{status}":
|
||||
|
Reference in New Issue
Block a user