[Bug]: Adding Content Length Guardrail requires Max word count to set for not enabled path as well.
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 71
- Forks
- 111
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 110
Description
Please select the area the issue is related to
Area/Management (Management API or Management Portal UI)
Please select the aspect the issue is related to
Aspect/API (API backends, definitions, contracts, interfaces, OpenAPI)
Description
I only needed to enable content length guardrail for Request path.
But had to set the Max value in the Response Path although the Response Path is disabled.
Otherwise, following error causes policy failure in gateway.
gateway-runtime-1 | [pol] time=2026-03-30T08:16:41.494Z level=ERROR msg="Failed to build policy chain for route, skipping" route=PATCH|/| error="failed to create policy instance content-length-guardrail:v1: failed to create policy instance content-length-guardrail:v1: invalid response parameters: 'max' must be greater than 0"
Steps to Reproduce
Try to add a content length guardrail for request flow.
Severity Level of the Issue
Severity/Critical (Core functionality is broken but there is a workaround. Need urgent attention)
Environment Details (with versions)
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the request-flow content length guardrail configuration described in the issue, then trace the Management API or Portal UI handling of the disabled response path and the gateway policy validation. Done means a request-only guardrail can be created without setting a response max value and the resulting policy builds successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100