Hi Blaisure,
you can try the iRules below...
when HTTP_REQUEST {
set referer [HTTP::header "Referer"]
}
when HTTP_REQUEST_SEND {
if { $referer starts_with "http" } then {
clientside{
HTTP::header replace "Referer" $referer
}
}
}
There is no need to test the existence of the
[HTTP::header]
during
HTTP_REQUEST
before accessing it. You will either get a "" (nothing) or a certain "referer_value" back. In
HTTP_REQUEST_SEND
you would then still check for valid referer information before writing it back to the request.
Good luck with your iRules solution!
BTW: Didn't test the functionality. But at least the formating should be now correct.
Cheers, Kai