Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: Nginx as a forward proxy - denying contents by MIME type

$
0
0
For those who are looking for a working solution: I could solve this by installing a basic squid server and setting up nginx to simply forward requests to squid.

Here's the nginx config I use now:

********************************************************

include proxy_params;

upstream squid {
server 127.0.0.1:3128;
}

# simple forwarding proxy facing the clients
server {
listen 192.168.182.2:80;

location / {
proxy_buffering off;
proxy_pass http://squid;
}
}

********************************************************

To do the filtering based on MIME type, I just had to append these two lines to my squid.conf:

acl deny_rep_mime_types rep_mime_type audio/ video/
http_reply_access deny deny_rep_mime_types

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>