Forum Discussion
Bhavik_1402
Apr 30, 2021Nimbostratus
irule syntax error
Hi Folks, I'm new to iRules and need to create few irules which is provided by the application vendor and getting an error for one of the line as shown below in italic bold letter. The syntax s...
Bhavik_1402
Nimbostratus
# means its just for comment and will not take in the effect. so does it mean the entire line is only for comment and will not be processed in irule?
# set string "for=[IP::client_addr];proto=$proto;by=[TCP::local_host];host=[HTTP::host] contextpath=$dsServiceName"
?
Apr 30, 2021
Yes, it will not processed. I found the irule in citrix forum.
https://discussions.citrix.com/topic/402284-f5-irules-to-netscaler-migrationinserting-xff-requests/
If you want to insert "Forwarded" header, you should remove #.
# Create the Forward header to be compliant with RFC7239
set string "for=[IP::client_addr];proto=https;by=[TCP::local_host];host=[HTTP::host];contextpath=<changewithservicename>"
HTTP::header insert "Forwarded" $string
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