Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Proxy_Pass variable not truncating URL

$
0
0
Hi all. I'm relatively new to NGINX as a reverse proxy and have run into a known issue with an unknown solution and need help please.

Currently we have an app that posts to domain.com/liveness and proxy_pass redirects this to an external 3rd party but it only passes through the data from the app after /liveness.

The 3rd party had a failover event on the weekend and as DNS is only reloaded when the config is reloaded, we had an outage on our side as well.

So now I've been tasked with setting up proxy_pass as a variable which I have added to the config. This means every time the variable is referenced it does a DNS lookup (to known internal resolved not on the local host) and it's working.

However the whole url is not passed through eg domain.com/liveness/api/xxx

I'm not an experienced coded so while a rewrite seems the correct way to do this I am baffled by the regex and associated $ variables to get the output sent to proxy_pass part to drop liveness.

Any help would be greatly appreciated. Thanks

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>