Forum Discussion
lardyboy_lardyb
Nimbostratus
Dec 15, 2004inserting client ip address into header when using SNAT
iRules novice here !!
I have a need to add the real client IP into the HTTP header when using a SNAT rule, but I need to do it dynamically. this is due to the upstream proxy using clie...
Nick_Johnston_2
Nimbostratus
Feb 07, 2005Any info on the error that we are getting? We consistently get the PREPEND_HEADERS error when attempting the TXT file download. We originally thought the extra 2 bytes at the end of the content was causing a problem with BigIP delivering the file, but this following iRule failed to correct the problem.
rule handle_two_trailing_bytes {
when HTTP_REQUEST {
set two_byte_error 0
if { [HTTP::uri] contains "export.fetchFile" } {
set two_byte_error 1
}
HTTP::header insert ORIG_CLIENT_IP [IP::remote_addr]
}
when HTTP_RESPONSE {
if { $two_byte_error } {
set content_len [HTTP::header Content-Length]
incr content_len 2
HTTP::header replace Content-Length $content_len
}
}
}
What exactly does the error mean?
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