poshtarenko opened a new issue, #10914:
URL: https://github.com/apache/apisix/issues/10914

   ### Description
   
   I need to validate whether a request or response is valid JSON or XML. I'm 
trying to solve this with a custom plugin.
   
   In the case of the request, everything is fine, I enter the rewrite phase 
and check the body of the request, if it is not valid, I set the status to 500
   
   However, in the case of a response, I can only read the response body in the 
**body_filter** phase, but in this phase I cannot change the response status. 
In this phase I can only change the response body
   
   How can you change the **response** status in Apisix (using a custom plugin, 
or another method) depending on the **response** body?
   
   ### Environment
   
   - APISIX version (run `apisix version`):
   - Operating system (run `uname -a`):
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`):
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


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