Skip to main content
OCLC Support

CookieFilter

Learn how to use the CookieFilter config.txt directive in EZproxy to specify how cookies are handled while proxying a website.

CookieFilter specifies the name of a cookie that should be blocked from passing through EZproxy to remote web servers. CookieFilter is typically used in environments in which an application on a separate server in the same domain sets a domain-based cookie which is being "seen" by the EZproxy server, but which should not be forwarded on to any remote web servers. For example, a local cookie with a value that coordinates single sign-on across multiple servers.

CookieFilter is a repeatable, position-independent config.txt directive.

CookieFilter in EZproxy v7.3 and newer allows for granular control of which cookies are passed or blocked from passing through the EZproxy server. These directives can be applied globally to all resources or applied to a single resource.

Qualifiers

Calificador Descripción
name The name of the cookie to block.
-global Apply this directive to all database stanzas
-local Apply this directive to the stanza that it is located within
-block Block a named cookie or all cookies if wildcard used from passing to the remote web server
-process Forward a named cookie or all cookies if wildcard used from passing to the remote web server

Sintaxis

The original syntax:

CookieFilter name

Has been redefined in EZproxy 7.3 to:

CookieFilter –global –block name

 Note: The original syntax CookieFilter name will continue to work.

Three additional directives have been introduced in EZproxy V7.3:

CookieFilter -global -process name or (*) 
CookieFilter -local -block name
CookieFilter -local -process name 

The name may be a specific cookie or wildcard may be used represented by a “*”. The –global directive instructs EZproxy to apply the rule to all stanzas in config.txt and it can be placed anywhere in the config file. 

To apply CookieFilter to a specific stanza place the directive between the Title and URL lines of the stanza you wish to affect. Do not use the –global directive. Here is an example of the placement:

Title Stanza Title Example 
CookieFilter –local -block name 
CookieFilter –local -process name 
URL https://url_example.com

Ejemplos

Block the cookie named SomeLocalCookie from passing through EZproxy:

CookieFilter -global -block SomeLocalCookie

Directivas relacionadas

ExtraLoginCookie