Blue Coat Systems Time Clock Proxy SG Manuel D’Utilisation

Page de 314
ProxySG Content Policy Language Guide
246
define action
Binds a user-defined label to a sequence of action statements. The 
action( )
 property has syntax that 
allows for individual action definition blocks to be enabled and disabled independently, based on the 
policy evaluation for the transaction. When an action definition block is enabled, any action 
statements it contains operate on the transaction as indicated by their respective arguments. See 
Chapter 5: "Action Reference" for more information about the various action statements available. 
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:
label
—A user-defined identifier for an action definition. Only alphanumeric, underscore, and 
dash characters can be used in the label given to a defined action.
list of action statements
—A list of actions to be carried out in sequence. See Chapter 5 
Action Reference for the available actions.
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( )