
Chapter 5: Action Reference
229
delete( )
Deletes all components of the specified header.
Note: An error results if two header modification actions modify the same header. The error is noted
at compile time if the conflicting actions are within the same action definition block. A
runtime error is recorded in the event log if the conflicting actions are defined in different
blocks.
Syntax
delete(header)
where:
header—A header specified using the following form. For a list of recognized headers, see Appendix
C.
•
request.header.header_name—Identifies a recognized HTTP request header.
•
response.header.header_name—Identifies a recognized HTTP response header.
•
request.x_header.header_name—Identifies any request header, including custom headers.
•
response.x_header.header_name—Identifies any response header, including custom headers.
•
exception.response.header.header_name—Identifies a recognized HTTP response header
from the exception response.
Layer and Transaction Notes
• Use with
exception.response.header.header_name in <Proxy> or <Exception> layers.
• Use with request or response headers in
<Proxy> or <Cache> layers.
• Do not use in
<Admin> or <Forward> layers.
• Applies to HTTP transactions.
Example
; Delete the Referer request header, and also log the action taken.
define action DeleteReferer
log_message("Referer header deleted: $(request.header.Referer)")
delete(request.header.Referer)
end action DeleteReferer
See Also
• Actions
: append( ), delete_matching( ), rewrite(header, regex_pattern,
replacement_component)
, set(header, string)
• Conditions:
request.header.header_name=, request.header.header_name.address=,
request.x_header.header_name=, request.x_header.header_name.address=,
response.header.header_name=, response.x_header.header_name=