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...
Yann_Desmarest
Cirrus
Hi,
You can also use switch or a datagroup :
using SWITCH :
when HTTP_REQUEST {
switch [HTTP::host] {
"name1.apps.abc.com" -
"namex.apps.abc.com" {
HTTP::header remove "X-Forwarded-For"
or do nothing
}
default {
HTTP::header insert "X-Forwarded-For" [getfield [IP::client_addr] "%" 1]
}
}
}
Using DATAGROUPS
when HTTP_REQUEST {
if { [class match [HTTP::host] contains X_FORWARD_HOST] } {
HTTP::header insert "X-Forwarded-For" [getfield [IP::client_addr] "%" 1]
} else {
HTTP::header remove "X-Forwarded-For"
or do nothing
}
}
Once you know the logic of those commands, you can choose the way you want to manage your exceptions.
SANTHOSHKUMAR_S
Aug 01, 2016Nimbostratus
Hi Yann , Please be more specific which rule must be ideal for my request , if my host name contain name1.apps.abc.com i should do nothing on x forwarder . If it contains any other name like name2.apps.abc.com or name3.apps.abc.com i should do x forwarder . Thanks
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