Forum Discussion
How to use literals starting with "$" in iRule
Hi,
I need to pass client certificate to WebSphere so the application can perform SSL based authentication. I following this article https://support.f5.com/csp/article/K95338243
However in WebSphere App Server the headed for client certificate is $WSCC. But if I code iRule like this
when HTTP_REQUEST {
HTTP::header insert $WSCC [b64encode [SSL::cert 0]]
}
$WSCC is treated as a variable WCSS and the rule is broken
How do I get around this issue?
Thanks
Genna
Hi Genna,
you can escape the '$' character with a '\'. This should work:
when HTTP_REQUEST { HTTP::header insert "\$WSSC" [b64encode [SSL::cert 0]] }
KR
Daniel
- Stan_PIRON_F5Employee
to prevent variable substitution, you can replace double quotes by curly braces.
when HTTP_REQUEST { HTTP::header insert {$WSSC} [b64encode [SSL::cert 0]] }
Stan
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