Skip to main content
OCLC Support

DenyIfRequestHeader

DenyIfRequestHeader specifies browser headers that, if present in EZproxy requests, indicate that access should be denied to EZproxy. It is extremely unusual to deny access to EZproxy based on a header sent by a browser, but if this action is required this directive should be used.

DenyIfRequestHeader is a repeatable, position-dependent config.txt directive. Optional filename is a user visible document of this directive.

Qualifiers
Qualifier Description
wildheader The header that indicates the access should be denied, which may include the * wildcard to match zero or more characteristics and the ? wildcard to mach any one character.

 Note: Wildheader may not contain any spaces.

Options
Option Description
allow If allow appears after the wildheader, then any further DenyIfRequestHeader directives should be ignored and access should be granted.
filename If the wildheader matches and filename is specified, EZproxy should send the content of filename to indicate why access is being denied.
Syntax
DenyIfRequestHeader denyfile wildcardtest
Examples
Deny access to Google indexing robot:
DenyIfRequestHeader User-Agent:*GoogleBot*

Deny access for people using a fictional, incompatible XYZ browser and give them feedback:

DenyIfRequestHeader User-Agent *XYZ* XYZFailsHere.htm
  • Was this article helpful?