How to grab a value from a request

halfpastjohn nginx-forum at forum.nginx.org
Mon Oct 2 22:23:37 UTC 2017


I'm setting up nginx as a proxy router for various APIs. How can I take a
specific value form the incoming request and dynamically populate it into
the upstream?

Request: https://api.domain.com/[resource]/v2/
Upstream: https://app.domain.com/api/[resource]/v2/

I this case, I want to take [resource] from the request and populate it into
the corresponding [resource] of the upstream path.

Thanks

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,276652,276652#msg-276652



More information about the nginx mailing list