Forum Discussion
Irule insert X-forward-host value
Hi everyone,
I would like to add a x-forward-host but I don't know the exact syntax to add it. The goal is that I redirect traffic to another webserver and that he knows where the client tried to connect, to avoid mixing UAT and prod traffic:
this is for the redirect (works fine): when HTTP_REQUEST { if { [ HTTP::header value Host ] equals "Uat.example.com" }{ HTTP::header replace Host "uat.destination.com" pool UAT } }
This is what I have till now for the x-forward-host (I copied it from the x-forward-for)
when HTTP_REQUEST { HTTP::header insert X-Forwarded-host [???] }
Someone any idea ?
thanks
- Brad_ParkerCirrus
Will this work?
when HTTP_REQUEST { HTTP::header insert X-Forwarded-host [HTTP::host] }
- Michael_Van_ImpNimbostratusWill try it out keep you posted about.. thanks
- Hari_Kishore_D_NimbostratusDid this work for you Michael. Am also looking for inserting x-forwarded-host and x-forwarded-proto into HTTP header. Hari
- Brad_Parker_139Nacreous
Will this work?
when HTTP_REQUEST { HTTP::header insert X-Forwarded-host [HTTP::host] }
- Michael_Van_ImpNimbostratusWill try it out keep you posted about.. thanks
- Hari_Kishore_D_NimbostratusDid this work for you Michael. Am also looking for inserting x-forwarded-host and x-forwarded-proto into HTTP header. Hari
Recent Discussions
Related Content
* 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