Filter by:
  • Solution
  • Technology

answers

iRule error message

Updated 1/22/2013 • Originally posted on 22-Jan-2013 by Milan 7

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

0
Rate this Question

Answers to this Question

3 Answers:

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Updated 22-Jan-2013 • Originally posted on 22-Jan-2013 by What Lies Beneath 6427
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?
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Updated 22-Jan-2013 • Originally posted on 22-Jan-2013 by Milan 7
Yes it worked. Thank you!
Milan
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Updated 22-Jan-2013 • Originally posted on 22-Jan-2013 by What Lies Beneath 6427
Ah good. You're welcome.
;