So, for blocking the video content, first we'll need to identify all the requests for video content. For this purpose, we can simply use the ACL type url_regex
as follows:
acl video_content urlpath_regex -i \.(mpg|mpeg|avi|mov|flv|wmv|mkv|rmvb)(\?.*)?$
The previous ACL list will match all the URLs ending with extensions of common video formats.
As a video can be served using dynamic URLs, the URL returning video content may not look like a URL to a video file at all. For achieving better control, we also need to use the ACL type rep_mime_type
to detect the content type of the replies returned by webservers. So, we can construct another ACL list as follows:
acl video_in_reply rep_mime_type -i ^video\/
The previous ACL list will match all the replies with video as a part of their content type. So, now we need to deny access to these ACL lists, which we can do by using the following rules:
http_access deny video_content http_reply_access deny video_in_reply...