ProxySG Content Policy Language Guide
define action
Binds a
Note: Action statements that must be performed in a set sequence and cannot overlap are best listed within a single action definition block
Syntax
define action label
list of action statements end [action label]
where:
•
•list of action
Layer and Transaction Notes
Each action statement has its own timing requirements and layer applicability. The timing requirements for the overall action are the strictest required by any of the action statements contained in the definition block.
Similarly, the layers that can reference an action definition block are the layers common to all the action statements in the block.
Action statements that are not appropriate to the transaction will be ignored.
Example
The following is a sample action given the name scrub_private_info, that clears the From and Referer headers (which normally could be used to identify the user and where they clicked from) in any request going to servers not in the internal domain.
<cache>
url.domain=!my_internal_site.com action.scrub_private_info(yes)
define action scrub_private_info set( request.header.From, "" ) set( request.header.Referer, "" )
end
Notice that the object on which the set( ) action operates is given in the first argument, and then appropriate values follow, in this case, the new value for the specified header. This is common to many of the actions.
See Also
• Properties: action( )
246