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 change the code to not insert the X-Forwarded-For header for a specific HTTP::host value (e.g. name2.apps.abc.com) and then insert the header on every other request...
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] eq "name2.apps.abc.com" } then {
Do nothing. Site doesn't require X-Forwarded-For header to be present...
} else {
Site requires X-Forwarded-For header. Adding the X-Forwarded-For header to request...
HTTP::header insert "X-Forwarded-For" [getfield [IP::client_addr] "%" 1]
}
}
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