Forum Discussion
Milan_61890
Nimbostratus
Jan 22, 2013iRule error message
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 Replies
- What_Lies_Bene1
Cirrostratus
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? - Milan_61890
Nimbostratus
Yes it worked. Thank you!
Milan - What_Lies_Bene1
Cirrostratus
Ah good. You're welcome.
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