mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Response size clamp (#786)
*) Limit response http body or json response size to FN_MAX_RESPONSE_SIZE (default unlimited) *) If limits are exceeded 502 is returned with 'body too large' in the error message
This commit is contained in:
@@ -169,6 +169,7 @@ func (li *lineWriter) Close() error {
|
||||
}
|
||||
|
||||
// io.Writer that allows limiting bytes written to w
|
||||
// TODO change to use clamp writer, this is dupe code
|
||||
type limitWriter struct {
|
||||
n, max int
|
||||
io.Writer
|
||||
|
||||
Reference in New Issue
Block a user