I have two plugin A and B, the execution order is A -> B。
when executing the ‘access’ phase in plugin A, Is there some magic not to execute the ‘access’ phase of remaining plugins , just proxy to upstream? I don’t wonder to use global variable like ‘ngx.ctx.skip_plugin’.
Now, I use:
kong.service.set_upstream(“hostname”)
runloop.access.after(ngx.ctx)
return ngx.exit(ngx.OK)
in the plugin A ‘access’ phase and it works, skip plugin B ‘access’ phase and proxy to upstream. However, it use kong private method ‘runloop.access.after’.
Is there any better way to implement this logic?