Skip to content

Commit 876e5f2

Browse files
committed
add another check
Signed-off-by: Arko Dasgupta <[email protected]>
1 parent d7d08e1 commit 876e5f2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/gatewayapi/backendtrafficpolicy.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,9 @@ func getCustomResponseBody(body *egv1a1.CustomResponseBody, resources *resource.
949949
b, dataOk := cm.Data["response.body"]
950950
switch {
951951
case dataOk:
952+
if err := checkResponseBodySize(&b); err != nil {
953+
return nil, err
954+
}
952955
return &b, nil
953956
case len(cm.Data) > 0: // Fallback to the first key if response.body is not found
954957
for _, value := range cm.Data {

0 commit comments

Comments
 (0)