How can I implement the following example through kong?

            location ~  /android/3/[0-9]+/recommend  {
                if ($remote_addr ~* ""){
                        proxy_pass  http://testServer;
                proxy_pass http://releaseServer;


This location directive translates into a regex path, in Kong, as documented in the Proxy Guide section about them. However, routing by client IP address is not supported out of the box, so you would have to write a custom plugin for this.


1 Like