Oracle iPlanet Web Proxy Server 4.0.14 Administration Guide

Filtering by MIME Type

You can configure the proxy server to block certain files that match a MIME type. For example, you could set up your proxy server to block any executable or binary files so that any clients using your proxy server can’t download a possible computer virus.

If you want the proxy server to support a new MIME type, in the Server Manager, choose Preferences > Create/Edit MIME Types and add the type. For more information on creating a MIME type, see Creating a MIME Type.

You can combine filtering MIME types with templates, so that only certain MIME types are blocked for specific URLs. For example, you could block executables coming from any computer in the .edu domain.

ProcedureTo Filter by MIME Type

  1. Access the Server Manager, and click the Filters tab.

  2. Click the Set MIME Filters link.

    The Set MIME Filters page is displayed.

  3. Choose the template you want to use for filtering MIME types, or make sure you are editing the entire server.

  4. In the Current filter text box, you can type a regular expression that matches the MIME types you want to block.

    For example, to filter out all applications, you could type application/.* for the regular expression. This method is faster than checking each MIME type for every application type. The regular expression is not case-sensitive. For more information on regular expressions, see “Understanding Regular Expressions” in Chapter 16, Managing Templates and Resources.

  5. Check the MIME types you want to filter.

    When a client attempts to access a file that is blocked, the proxy server returns a “403 Forbidden” message.

  6. Click OK.

  7. Click Restart Required.

    The Apply Changes page is displayed.

  8. Click the Restart Proxy Server button to apply the changes.