Forum Discussion
Sep 05, 2018
HTTP::header replace error
Hello,
I currently have an irule applied to a Virtual Server and recently noticed some error messages in the logs. I am not sure when it actually started but it has been consistent for the past 30...
Sep 05, 2018
Yes. There are a few irules.
irule 1
when HTTP_REQUEST {
if { ([string tolower [HTTP::host]] starts_with "abc") } {
HTTP::respond 301 Location https://www.[HTTP::host][HTTP::uri]
}
}
irule 2
when HTTP_REQUEST {
if { ([string tolower [HTTP::host]] starts_with "abccatseguin.com ") } {
HTTP::respond 301 Location https://www.abc.com
}
}
irule 3
when HTTP_REQUEST {
set the URL here, log it on the response
set url [HTTP::header Host][HTTP::uri]
set vip [IP::local_addr]:[TCP::local_port]
set hsl [HSL::open -proto UDP -pool splunk]
}
when HTTP_RESPONSE {
set client [IP::client_addr]:[TCP::client_port]
set snat [IP::local_addr]
set node [IP::server_addr]:[TCP::server_port]
set nodeResp [HTTP::status]
set hsl [HSL::open -proto UDP -pool splunk]
log connection info
HSL::send $hsl "Client: $client -> SNAT: $snat -> VIP: $vip -> URL: $url -> Node: $node with response $nodeResp"
}
Thanks
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects