Add warning when maxBodySize is not set
This commit is contained in:
parent
a030638183
commit
5d830477b7
2 changed files with 37 additions and 1 deletions
|
|
@ -88,6 +88,8 @@ func NewForward(ctx context.Context, next http.Handler, config dynamic.ForwardAu
|
|||
|
||||
if config.MaxBodySize != nil {
|
||||
fa.maxBodySize = *config.MaxBodySize
|
||||
} else if fa.forwardBody {
|
||||
logger.Warn().Msgf("ForwardAuth 'maxBodySize' is not configured with 'forwardBody: true', allowing unlimited request body size which can lead to DoS attacks and memory exhaustion. Please set an appropriate limit.")
|
||||
}
|
||||
|
||||
// Ensure our request client does not follow redirects
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue