AlinsRan commented on PR #13489:
URL: https://github.com/apache/apisix/pull/13489#issuecomment-4666649235

   @membphis good catch, you're right. `ai-prompt-guard.access` returned `400` 
on the JSON decode error *before* `fail_mode` was consulted, so a 
Consumer/Service-bound prompt guard still rejected plain form / multipart / 
non-JSON traffic under the default `skip` — exactly the case this PR is meant 
to fix.
   
   Fixed in 9e2dcf6: the decode-error branch now goes through 
`binding.on_unsupported(conf.fail_mode, ...)` as well — `error` keeps the 400, 
while `skip`/`warn` let the request pass through. Also added a non-JSON 
(`multipart/form-data`) passthrough test for `ai-prompt-guard` mirroring the 
Aliyun/AWS coverage. PTAL.


-- 
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