Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Squid can do this easily. Just setup an acl that blocks requests for file extensions you don't want.

  acl Blocked_extensions urlpath_regex -i "/etc/squid3/blocked.extensions.acl"
  http_access deny Blocked_extensions
The contents of /etc/squid3/blocked.extensions.acl would be something like:

  \.css$
  \.css\?.*$
  \.js$
  \.js\?.*$
  \.woff$
  \.woff\?.*$
  \.eot$
  \.eot\?.*$
  \.svg$
  \.svg\?.*$
It's also easy to run squid in transparent proxy mode if you want to support older devices that don't let you manually specify a proxy.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: