Chapter 5: Action Reference
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:
•
•
•
•
•
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=
229