Inserting a cookie, Deleting a cookie – Brocade Virtual ADX Server Load Balancing Guide (Supporting ADX v03.1.00) User Manual
Page 270

254
Brocade Virtual ADX Server Load Balancing Guide
53-1003247-01
Layer 7 content switching
5
By default, the format of the Syslog message is as follows.
source-ipaddr source-port protocol Rule matched, action-message
Additionally, you can change the format of the Syslog message using the following tokens:
•
$SIP – Source IP address
•
$DIP – Destination IP address
•
$SPT – Source port
•
$DPT – Destination port
•
$HST – Host name
•
$URL – URL
•
$RUL – Rule name
•
$ACT – Action
For example, the following command specifies an alternate format for the Syslog message:
Virtual ADX(config-csw-policy1)#match r1 log "$SIP:$SPT->$DIP:$DPT,ru $RUL hit
$ACT"
In this example, when a packet matches rule r1, a message such as the following is written to
Syslog.
192.168.9.210:80->10.10.10.10:80, ru r1 hit forward
Inserting a cookie
You can configure the Brocade Virtual ADX to insert a cookie into an HTTP response when a
specified rule is matched. When the rule is matched, a cookie is inserted in the response when any
of the following occur:
•
No cookie header is found in the HTTP request, or a cookie header exists but it does not
contain the cookie name specified by the rewrite insert-cookie command.
•
The specified cookie name is found in the HTTP request, but the cookie value is out of the
range used for cookie switching. The cookie value must be between 1 and 17407.
•
The specified cookie name is found in the HTTP request, but the real server or server group
indicated by the cookie value is not available.
For example, the following command causes the Brocade Virtual ADX to insert the cookie indicated
by the rewrite insert-cookie command into the HTTP response when rule r1 is matched.
Virtual ADX(config-csw-policy1)#match r1 rewrite insert-cookie
Syntax: [no] match rule-name rewrite insert-cookie
Deleting a cookie
Cookie deletion causes the Brocade Virtual ADX to delete the cookies that it set. The Brocade
Virtual ADX removes the cookie from the HTTP request prior to sending the request to the server.
For example, the following command causes the Brocade Virtual ADX to delete the cookie indicated
by the rewrite insert-cookie command from the HTTP response when rule r1 is matched.
Virtual ADX(config-csw-policy1)#match r1 rewrite delete-cookie
Syntax: [no] match rule-name rewrite delete-cookie