Forum Discussion
Angelo
Nimbostratus
Sep 13, 2012source address in URI header
Hi
i need to insert the source address into the header of a website is there a way for me to do this. i think i will need to have streaming for this but not sure how to set it up...
Kevin_Stewart
Employee
Sep 13, 2012For some reason my code block was munged. Here's what I meant to say.
when HTTP_REQUEST {
disable stream processing for request traffic
STREAM::disable
s store the client IP address
set client_ip [IP::client_addr]
}
when HTTP_RESPONSE {
if { [HTTP::header Content-Type] equals "text/html" } {
establish the stream expression - here we're just modifying the contents <br /> STREAM::expression "@@ - ($client_ip)@"
enable stream processing
STREAM::enable
}
}
This replaces the end title tag with the client IP and end tag.
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