Forum Discussion
SANTHOSHKUMAR_S
Aug 01, 2016Nimbostratus
irule for x forwarder
We have virtual server with wildcard certificate installed , like *apps.abc.com . I need have x forwarder enabled when there is request for name1.apps.abc.com , Similarly I need to disable x forwarde...
Kai_Wilke
Aug 01, 2016MVP
Hi Santhoshkumar,
you may try the iRule below...
when HTTP_REQUEST {
set low_hostname [string tolower [HTTP::host]]
if { ( $low_hostname eq "name1.apps.abc.com" ) or
( $low_hostname eq "nameX.apps.abc.com" ) } then {
Site requires X-Forwarded-For headers. Adding the X-Forwarded-For header to request...
HTTP::header insert "X-Forwarded-For" [getfield [IP::client_addr] "%" 1]
} else {
Do nothing. Site doesn't require X-Forwarded-For header to be present...
}
}
Cheers, Kai
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