I have nginx configured to proxy requests :
server {
listen 80;
server_name proxy.mydomain.com;
location /proxy {
resolver 8.8.8.8;
proxy_pass $args/;
}
}
So I can make request like : http://proxy.mydomain.com/proxy?http://www.test.com
I'd like to control which domain is allowed to be proxied. I don't know how to do it without an if.