Forum Discussion
irule syntax error
Hi Bhavik_1402,
# char is placed at the beginning of the comment lines. The line starting with "for" should be at the end of the line above.
# Create the Forward header to be compliant with RFC7239
# set string "for=[IP::client_addr];proto=$proto;by=[TCP::local_host];host=[HTTP::host];contextpath=$dsServiceName"
# HTTP::header insert "Forwarded" string
- Bhavik_1402Apr 30, 2021Nimbostratus
# 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
- Bhavik_1402Apr 30, 2021Nimbostratus
Thanks Enes,
This will really helps. I'll need to configure few other irules related to the same and will put something if require.
Thank you again for your help.
Recent Discussions
Related Content
* 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