Thanks Stephen. I was able to get it working. The next challenge I am facing is since the code will be deployed to multiple environments, the proxy_pass will be different per environment. My thought was to look at the referer header within the location directive and proxy to the right backend server. But, NGINX strongly prohibits using "if" conditions within the location directive. How would I accomplish this with the Staticfile buildpack? From what I see, Staticfile doesnt let you define new server virtual hosts. Maybe thats a limitation of the staticfile and i need to look at another buildpack ?
Any thoughts would be highly appreciated!
Thanks