Forum Discussion
Angelo
Sep 13, 2012Nimbostratus
source 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_StewartEmployeeAre you talking about the title or a block of HTML? It's relatively straight forward if there's an HTML object that you can (consistently) grab onto:
If the DOM object has a specific attribute just modify your stream expression to look for and replace that.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 STREAM::expression "@@ - ($client_ip)@" enable stream processing STREAM::enable } }
- AngeloNimbostratusHI Kevin
- Kevin_StewartEmployeeFor some reason my code block was munged. Here's what I meant to say.
- Kevin_StewartEmployeeAhh! it did it again...
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 STREAM::expression "@@ - ($client_ip)@" enable stream processing STREAM::enable } }
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