Redirect from a plugin's custom logic (disable other plugins per request)

Hey,

I am developing a custom plugin for routing based on consumer data. I have a case when I want to redirect without other plugins bein applied.

My question is, is it possible to prevent the execution of other plugins when calling kong.service.set_target() (just after that), e.g. redirect to an URL just after that call with path, all passed arguments and body payloads (and not wait for all other plugins to execute)?

In particular, I would like to disable rate-limiting plugin on demand, per request.

Any suggestions to that?

I was able to solve it myself. I then went with ngx.redirect(x, 307) instead of kong.service.set_target() . It seems it works well for my case. I haven’t spotted any problems yet.

Instead of redirect, Is there any way to proxy. Basically the use case is I shouldn’t want to loose the URL which was shown in the browser. If it is redirect the URL in the browser will be replaced with the redirect url. I don’t want redirect, I want to proxy.

Any suggestion? Let me know if you need more information.