[GitHub] [apisix] shreemaan-abhishek commented on issue #9928: help request: Dynamic routing based on HTTP_STATUS from first API

2023-08-02 Thread via GitHub


shreemaan-abhishek commented on issue #9928:
URL: https://github.com/apache/apisix/issues/9928#issuecomment-1663199849

   > 1. What libraries are available in each phase?
   
   Can't list them all but it's logical thinking: _you cannot modify the 
response headers even before the HTTP request is sent to the upstream_, does it 
makes sense?
   
   > 2. If only some libraries are accessible in each phase, how I can chain 
the execution of 2 plugins where the response of the 1st plugin is available in 
the 2nd plugin
   
   I don't have an answer right now, let me think of something.


-- 
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: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [apisix] shreemaan-abhishek commented on issue #9928: help request: Dynamic routing based on HTTP_STATUS from first API

2023-08-01 Thread via GitHub


shreemaan-abhishek commented on issue #9928:
URL: https://github.com/apache/apisix/issues/9928#issuecomment-1661594324

   APISIX plugins are executed sequentially through the phases in openresty:
   
   https://github.com/apache/apisix/assets/61597896/b00750d5-a78f-4215-9ae4-4a691db9910e";>
   
   i.e plugins that run on the `rewrite` phase will always execute before the 
plugins in the `access` phase irrespective of priority. (the priority is 
followed strictly among the plugins that run under the same given execution 
phase).


-- 
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: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [apisix] shreemaan-abhishek commented on issue #9928: help request: Dynamic routing based on HTTP_STATUS from first API

2023-08-01 Thread via GitHub


shreemaan-abhishek commented on issue #9928:
URL: https://github.com/apache/apisix/issues/9928#issuecomment-1660043701

   > I don't know how get the /api1 response (headers, json body) in the 1st 
proxy-rewrite plugin from 2nd plugin serverless-post-function.
   
   Why do you want access the response body and headers? 🤔 


-- 
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: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [apisix] shreemaan-abhishek commented on issue #9928: help request: Dynamic routing based on HTTP_STATUS from first API

2023-08-01 Thread via GitHub


shreemaan-abhishek commented on issue #9928:
URL: https://github.com/apache/apisix/issues/9928#issuecomment-1660039769

   @chilcano,
   
   > What is $status in the first route?
   
   `$status` is an nginx variable: 
https://nginx.org/en/docs/http/ngx_http_core_module.html#var_status. This 
means, the `HTTP_STATUS` will be stored in the `X-Api1-Status` http header.
   
   
   


-- 
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: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org