Forum Discussion
Vova_1985_18320
May 28, 2015Nimbostratus
iRule based on domain
Hi im looking for a way to accept traffic with * expression, is it possible?
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] eq "*.example.com*"} {
pool $HTTP_pool
} el...
Vova_1985_18320
May 28, 2015Nimbostratus
Nothing usefully, the errors related to irule is the last errors i had when the syntax was wrong.
May 28 14:10:53 ams-f501 err mcpd[8729]: 01070151:3: Rule [/Common/Origin] error: /Common/Origin:4: error: [parse error: missing close-brace][{ if { [HTTP::header exists Origin] } { switch -glob ([string tolower [HTTP::header Origin]]) { "*mydomain1.com" { pool $HTTP_pool } "*mydomain2.com" { pool $HTTP_pool } "*mydomain3.com" { pool $HTTP_pool } default { HTTP::respond 403 } } }] /Common/Origin:5: error: [command is not valid in the current scope][if { [HTTP::header exists Origin] } { switch -glob ([string tolower [HTTP::header Origin]]) { "*mydomain1.com" { pool $HTTP_pool } "*mydomain2.com" { pool $HTTP_pool } "*mydomain3.com" { pool $HTTP_pool } default { HTTP::respond 403 } } }]
May 28 14:11:00 ams-f501 err mcpd[8729]: 01070151:3: Rule [/Common/Origin] error: /Common/Origin:4: error: [parse error: missing close-brace][{ if { [HTTP::header exists Origin] } { switch -glob ([string tolower [HTTP::header Origin]]) { "*mydomain1.com" { pool $HTTP_pool } "*mydomain2.com" { pool $HTTP_pool } "*mydomain3.com" { pool $HTTP_pool } default { HTTP::respond 403 } } }] /Common/Origin:5: error: [command is not valid in the current scope][if { [HTTP::header exists Origin] } { switch -glob ([string tolower [HTTP::header Origin]]) { "*mydomain1.com" { pool $HTTP_pool } "*mydomain2.com" { pool $HTTP_pool } "*mydomain3.com" { pool $HTTP_pool } default { HTTP::respond 403 } } }]
May 28 14:18:44 ams-f501 notice mcpd[8729]: 01071682:5: Resuming log processing at this invocation; held 4 messages.
May 28 14:18:44 ams-f501 notice mcpd[8729]: 01071682:5: SNMP_TRAP: Virtual /Common/TESTORIGIN has become unavailable
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