Forum Discussion
AnupamG_354580
Nimbostratus
Jul 09, 2018authorization header are dropped
Hello Folks , i have two VIP configured , One for PROD and one for UAT . in UAT when i insert any authorization header it gets dropped but PROD is OK
Below are xforward configured . I want to u...
youssef1
Cumulonimbus
Jul 09, 2018Hi,
to sum UP:
In UAT if "X-Forwarded-For" exist you add an additional value using this command (and even if this header don't exist you insert X-Forwarded-For header in else condition):
HTTP::header insert X-Forwarded-For [IP::client_addr]
In production you check if "X-Forwarded-For" header exist, if yes you replace value by:
HTTP::header replace X-Forwarded-For "[HTTP::header X-Forwarded-For], [IP::client_addr]"
but you made a mistake you forget values in command:
HTTP::header replace X-Forwarded-For "[HTTP::header values X-Forwarded-For][IP::client_addr]"
So modify text your irule production by:
when HTTP_REQUEST {
if {[HTTP::header exists X-Forwarded-For]}{
HTTP::header replace X-Forwarded-For "[HTTP::header values X-Forwarded-For], [IP::client_addr]"
} else {
HTTP::header insert X-Forwarded-For [IP::client_addr]
}
Keep me update.
regards
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