shreemaan-abhishek opened a new pull request, #13692:
URL: https://github.com/apache/apisix/pull/13692

   ### Description
   
   `deny_code` in `ai-aws-content-moderation` and 
`ai-aliyun-content-moderation` was an unbounded `number`, so any value (a 
negative number, `0`, `700`, a fractional code) could be configured even though 
the plugins use it as the HTTP status of the deny response.
   
   This bounds `deny_code` to a valid HTTP status range and documents it:
   
   ```lua
   deny_code = {
       type = "integer",
       minimum = 200,
       maximum = 599,
       default = 200,
       description = "...",
   },
   ```
   
   The default (`200`) and runtime behavior are unchanged. Only 
previously-invalid configs are now rejected at `check_schema` time.
   
   #### Which issue(s) this PR fixes:
   
   Fixes #
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [x] I have added tests corresponding to this change
   - [x] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible (default and 
behavior unchanged; only out-of-range values, which never produced a valid HTTP 
status, are now rejected)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to