Forum Discussion
VernonWells
Aug 30, 2015Employee
The method for changing a header value is:
HTTP::replace
as in:
when HTTP_RESPONSE {
if { [HTTP::is_redirect] && [string tolower [HTTP::header Location]] contains "example.com" } {
HTTP::header replace Location "[HTTP::header value Location]&stuff=1"
log local0. "New Location header value: [HTTP::header value Location] "
}
}
Notice that the
HTTP::header replace
operation is not placed in the substitution operators ([...]) because you require not return value from that operation.