Svevak_211593
Mar 18, 2016Nimbostratus
requires an associated HTTP or FASTHTTP profile on the virtual-server
Hi,
I get following error after adding the iRule to a vs: 01071912:3: HTTP_REQUEST event in rule (/Common/irule-geo_white) requires an associated HTTP or FASTHTTP profile on the virtual-server (/Common/test-http-dsr-vs).
The iRule should geoblock countries and whitelist some other and give back a video to the geoblocked countires:
when CLIENT_ACCEPTED {
set redirect 0
if { [class match [IP::client_addr] equals datagroup-SmartTVApp] } then {
pool clips-http-dsr-pool
} else {
switch -exact -- [whereis [IP::client_addr] country] {
"DE" -
"AT" -
"CH" -
"LI" -
"LU" {
pool clips-http-dsr-pool
} else {
set redirect 1
}
}
}
}
when HTTP_REQUEST {
if {$redirect == 1} {
switch -glob [HTTP::path] {
"*.f4m" { HTTP::redirect http://example.de/path/to/video/GEO.f4m}
"*.m3u8" { HTTP::redirect http://example.de/path/to/video/GEO.m3u8}
default { set file_extension -}
}
}
}
What am I doing wrong?