Block extension for specified IP address

Dr_tux nginx-forum at forum.nginx.org
Fri Jan 1 07:54:21 UTC 2021


Hi Guys, 

I'm stuck in this. I am open to your suggestions. Thank you.

I have a reverse proxy configuration as follows, I want to block exe
extensions for requests from here. But it doesn't work. How can I do that ?

Example Config:

 location / {

		types {
		        application/octet-stream bin exe dll;
                        allow 10.1.1.2/32;
    		        deny all;
 		}

                proxy_pass http://10.1.1.9:4545;
    	    	proxy_http_version 1.1;
                proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
                proxy_set_header Host $host;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "Upgrade";
            }

Thank you in advance.

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



More information about the nginx mailing list