You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/02/15 13:38:34 UTC

[GitHub] [apisix] nic-chen commented on a change in pull request #3595: fix: should assign value to `api_ctx.global_rules` before running global rules

nic-chen commented on a change in pull request #3595:
URL: https://github.com/apache/apisix/pull/3595#discussion_r576197819



##########
File path: apisix/init.lua
##########
@@ -297,8 +297,8 @@ function _M.http_access_phase()
     router.router_http.match(api_ctx)
 
     -- run global rule
-    plugin.run_global_rules(api_ctx, router.global_rules, "access")
     api_ctx.global_rules = router.global_rules

Review comment:
       @spacewander  
   Thanks for reviewing.
   I still have some doubts. The original code also assign value to `api_ctx.global_rules` after `run_plugin`, but it does not cause a bug like this. . 
   




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

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