Hi at all,
I want to give the user a video back if he’s from a geoblocked country or not on the whitelist. Also I need to check if the user needs an online or mobile version of the video.
This is what I’ve done so far…
when CLIENT_ACCEPTED {
if { [class match [IP::client_addr] equals datagroup-xyz] } then {
pool xyz-http-dsr-pool
} else {
switch -exact -- [whereis [IP::client_addr] country] {
"DE" -
"AT" -
"CH" -
"LI" -
"LU" {
pool xyz-http-dsr-pool
}
default {
reject
}
}
}
}
when HTTP_REQUEST {
HTTP::redirect "http://hostname.com/path/to/video/GEO.f4m"
switch -glob [HTTP::path] {
"*.f4m" { set http://hostname.com/path/to/video/GEO.f4m}
"*.m3u8" { set http://hostname.com/path/to/video/GEO.m3u8}
"*.xml" { set http://hostname.com/path/to/video/GEO.xml}
default { set file_extension -}
}
}
Hope you understand my question.
Regards, Daniel