Forum Discussion
JRahm
Admin
Oct 22, 2007Replacing rule login in a Profile
I am trying to eliminate an iRule for a particular applciation as most of the logic has been replaced in the application. The only piece remaining is replacing the host header with the X-Forwarded-For header:
if { [HTTP::header exists "X-Forwarded-Host"] } {
HTTP::header replace "Host" [HTTP::header "X-Forwarded-Host"]
}Can this be done in the http or httpclass profile? Any suggestions would be appreciated. I'll post back if I find it first.
2 Replies
- hoolio
Cirrostratus
Hey Citizen,
The only (remote) option I could think of was the HTTP profile option for 'Header to Insert'. But the help notes don't make it look good:
"Specifies a string that the system inserts as a header in an HTTP request. If the header exists already, the system does not replace it."
The HTTP class object doesn't allow you to modify a request.
I think you're stuck with an iRule if you want to rewrite an existing header with a customer header's value...
Aaron - JRahm
Admin
Yeah, I saw that, thought I'd give it a shot anyway. Thanks for the feedback. I hate having to stick such a minimal rule out there, but oh well.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
