From d8b531897c97803680cb3fd68fc32709fd1dc9a2 Mon Sep 17 00:00:00 2001 From: "May.Buzaglo" Date: Tue, 1 Apr 2025 10:57:54 +0300 Subject: [PATCH] add verification check Signed-off-by: May.Buzaglo --- pkg/types/config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/types/config.go b/pkg/types/config.go index 86144daf..55e14902 100644 --- a/pkg/types/config.go +++ b/pkg/types/config.go @@ -161,6 +161,9 @@ func (c Configuration) Validate() error { if c.RequestBatchMaxCount > c.RequestBatchMaxBytes { return errors.New("RequestBatchMaxCount is bigger than RequestBatchMaxBytes") } + if c.RequestMaxBytes > c.RequestBatchMaxBytes { + return errors.New("RequestMaxBytes is bigger than RequestBatchMaxBytes") + } if c.RequestForwardTimeout > c.RequestComplainTimeout { return errors.New("RequestForwardTimeout is bigger than RequestComplainTimeout") }