Forum Discussion
Apr 23, 2010
HTTP Response Capture Node Name
regsub -all "" [HTTP::payload] " [IP::server_addr] newdata
HTTP::payload replace 0 $content_length $newdata
HTTP::release
I'm trying to get an iRule configured to present the "Node:List Name" to the users
This is what I have which dispays IP but I need node name
- hoolio
Cirrostratus
Hi Dan, - hoolio
Cirrostratus
Do you want to do this on all responses? Could you use the IP address instead? If so, you could add a blank stream profile, a custom HTTP profile with response chunking set to rechunk and an iRule like this to rewrite the title tag in responses to title>1.1.1.1:when HTTP_RESPONSE { Disable the stream filter by default STREAM::disable Check if response type is text if {[HTTP::header value Content-Type] contains "text"}{ Insert the server IP address:port into the HTML title tag STREAM::expression "@[subst -nocommands {[tT][iI][tT][lL][eE]>}]@title>[IP::server_addr]:[TCP::server_port]@" Enable the stream filter for this response only STREAM::enable } }
- Aaron, for some reason the forum software didn't like you using the full title html element and was blocking it even if the angle brackets were encoded. I modified your response to remove the beginning less-than symbol and it's posting. I'll look into this and see if I can get a fix.
- hoolio
Cirrostratus
Thanks for that Joe.
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