Forum Discussion
Help with iRule syntax
Hi members,
Need help with iRule programming. can someone help provide assistance to have this script work?
when HTTP_REQUEST { if { not ([class match [string [IP::local_addr] ]] contains ApiGWHosts]) }{ foreach header {idm_header} { HTTP::header remove $header } } }
It's giving out an error. PARSE syntax 93 {syntax error in expression " not ([class match [string [IP::local_addr] ]] contains ApiG...": variable references require preceding $}][{ not ([class match [string [IP::local_addr] ]] contains ApiGWHosts])
Thanks!! and appreciate the help!
- Stanislas_Piro2
Cumulonimbus
Hi,
you can try this version:
when HTTP_REQUEST { if { not ([class match [string [IP::local_addr] ] contains ApiGWHosts]) } { foreach header {idm_header} { HTTP::header remove $header } } }
there was 1 closing bracket I removed and a space I added between
and}
at the end of if condition{
- Stanislas_Piro2
Cumulonimbus
when HTTP_REQUEST { if { not ([class match [IP::local_addr] contains ApiGWHosts]) } { foreach header {idm_header} { HTTP::header remove $header } } }
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