kayx23 commented on issue #9433:
URL: https://github.com/apache/apisix/issues/9433#issuecomment-1539923862

   Hi @kellyseeme , you can adjust the order of execution by plugin priorities, 
given that they are executed in the same phase (e.g. rewrite, access).
   
   In your case, `ip-restriction` has a [default priority of 
3000](https://github.com/apache/apisix/blob/e85ef647471effdc2eb861a9bc29565660172558/conf/config-default.yaml#L426).
 Not sure about your other arbitrary plugin. 
   
   So two cases: 
   
   1. if two plugins are executed in the same phase, then whichever plugin has 
the higher priority will be executed first.  
   2. if two plugins are executed in different phases, say [`ip-restriction` is 
in 
rewrite](https://github.com/apache/apisix/blob/e85ef647471effdc2eb861a9bc29565660172558/apisix/plugins/ip-restriction.lua#L23)
 and the other one is in access, then the logic of rewrite will be executed 
before the logic of access, regardless of priority.
   
   For more info, see [Plugin Execution 
Order](https://docs.api7.ai/apisix/key-concepts/plugins#plugins-execution-order)
 doc.
   
   
   
   


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

Reply via email to