Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

XFF replace iRule help

dinodell4477
Nimbostratus
Nimbostratus

How would I go about replacing the X-Forwarded-For header with a value from another header such as "Real-Client-IP" for example. Something like the below is what i'm statrting with but this obviously isnt working. 

when HTTP_REQUEST {
HTTP::header replace X-Forwarded-For HTTP::header value Real-Client-IP [HTTP::header value X-Forwarded-For]
}

Thanks in advance!

1 ACCEPTED SOLUTION

Hello Tetimmons.

Try this:

when HTTP_REQUEST {
   HTTP::header replace X-Forwarded-For [HTTP::header value Real-Client-IP]
   HTTP::header remove Real-Client-IP
}

 

Regards,
Dario.

View solution in original post

2 REPLIES 2

Hello Tetimmons.

Try this:

when HTTP_REQUEST {
   HTTP::header replace X-Forwarded-For [HTTP::header value Real-Client-IP]
   HTTP::header remove Real-Client-IP
}

 

Regards,
Dario.

dinodell4477
Nimbostratus
Nimbostratus

Thanks all!