I am loading images from an external site which I want to use in a 3D WebGL canvas. However this is not allowed due to origin.
The URL I am generating from the web page is as follows:
http://domain/somename/imagesproxy?url=http%3A%2F%2Fanothersite%2Fimage.png
Now I want to proxy_pass
I assume, to the URL included in the request.
location /somename/imagesproxy {
proxy_pass ...
proxy_set_header host localhost;
}
How do I get nginx to dynamically proxy to different URL's