Forum Discussion
Sabeer_Ali_2389
Feb 05, 2016Altostratus
X-Forwarded in F5
We have below X-Forwarded configured on our cisco ACE , now we are migrating the VIP to F5 LTM. How we can configure the X-Forwarded in F5 ?
insert-http X-Forwarded-Proto header-value "%is"
...
Brad_Parker
Cirrus
Just notice you also mentioned X-Forward-Proto and X-Forwarded-Port, if you want that you will have to either use a local traffic policy or an iRule. A real easy irule to add those is this.
when CLIENT_ACCEPTED {
if { [PROFILE::exists clientssl] == 1 } {
set protocol "https"
}
else {
set protocol "http"
}
}
when HTTP_REQUEST {
HTTP::header replace X-Forwarded-Proto $protocol
HTTP::header replace X-Forwarded-Port [TCP::local_port]
}
Brad_Parker
Feb 05, 2016Cirrus
yeah, but then I realized "exists" is 0 or 1. Brain was going in two directions.
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