Forum Discussion
Irule insert http header % issue
Hello,
I am working on a F5 which is configured with route domains. Several vips use the same irule that insert a http header, it insert the ip address of the vip.
HTTP::header insert BIGIP_VIP [IP::local_addr]
I found out that because of the route domains, it also inserts %2 afte the ip address For example, my vip is 10.10.10.10, my F5 insert 10.10.10.10%2 into the http header.
How do I change the irule so that it only inserts the ip address of the vip, and not the %2 of the route domain?
Cheers Theo
2 Replies
- kunjan
Nimbostratus
Try this:
HTTP::header insert BIGIP_VIP [getfield [IP::local_addr] "%" 1] when HTTP_REQUEST { set local_addr [IP::local_addr] set trim_string "%2" set new_local_addr [string trimright $local_addr $trim_string] HTTP::header insert BIGIP_VIP $new_local_addr }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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