Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral


Questions and Answers

Loading... Loading...

Hello,

 

my iRule keeps producing the following error message:

TCL error: clean_incoming_xff  - Operation not supported (line 1)     invoked from within "HTTP::header remove "X-Forwarded-For""

the iRule itself:

clean_incoming_xff:
when HTTP_REQUEST
{
    HTTP::header remove "X-Forwarded-For"
    HTTP::header remove "X-Forwarded-For-Extended"
    HTTP::header insert "X-Forwarded-For" [IP::client_addr]
    HTTP::header insert "X-Forwarded-For-Extended" [IP::client_addr]:[TCP::client_port]
}

Is there an error in the iRule?

 

Thanks in advance for any hint.

Milan


3 Answer(s):

Could it be that the header doesn't exist? Perhaps you can use an if statement with the HTTP::header exists command to check they exist before you try and delete them?
Yes it worked. Thank you!
Milan
Ah good. You're welcome.

Your answer:

You must be logged in to reply. You can login here.