Forum Discussion
Moonotech
Nimbostratus
Sep 05, 2024Request URL and Referel http header
Hello Everyone, Kindly help with how i can change the Request URL and Referrel header field. And also i want to be able to send the 2 field to the logs. Many Thanks. Regards,
spark_86682
Feb 29, 2012Historic F5 Account
If I understand you correctly, you're trying to sometimes alter the HTTP status code of a response passing through the BIG-IP. You could just do this at the TCP level and bypass all of the messing about at the HTTP layer altogether. Something like (totally untested):
when SERVER_CONNECTED {
if { $should_alter_response_status } {
TCP::collect 12
}
}
when SERVER_DATA {
set payload [TCP::payload 12]
regsub 200 $payload 503 payload
TCP::payload replace 0 12 $payload
TCP::release
}