Re: [openresty-en] Strip path in Lua example

24 views
Skip to first unread message

Aapo Talvensaari

unread,
Sep 23, 2016, 6:23:47 PM9/23/16
to openresty-en
On Fri, Sep 23, 2016 at 4:06 PM, Craig Jones <cr...@brechmos.org> wrote:
I am using the example at https://openresty.org/en/dynamic-routing-based-on-redis.html and it appears to be working well except for one thing.

When I go to http://<mysite>/foo and have a mapping of "/foo" to "nginx.com" in redis then the proxy_pass is sending me to http://nginx.com/foo.

How do I remove the path ("/foo") from the target in the proxy_pass?

Otherwise works great and is exactly what I needed

Did you try:

proxy_pass http://$target/;

(pardon me, if it doesn't work)
Reply all
Reply to author
Forward
0 new messages