Hi
I’m trying to create acls that search a incoming header for a country code and send to the appropiate backend, its sort of working but not all work, in particular “Africa” and “middle east” can anyone see any glaring mistakes in this, all the backends work, I can ping them all, visit them direct etc:
Define regions for geo-based routing
North America
# acl europe_ipcountry_acl hdr(cf-ipcountry) -i GB # check the cloudflare header for country
acl northamerica_ipcountry_acl hdr(cf-ipcountry) -m reg '^(CA|US|MX)$'
# acl northamerica_ipcity_acl hdr(cf-ipcity) -i Bristol # check the cloudflare header for city
# acl northamerica_ipregion_acl hdr(cf-region) -m reg '^(AK|AL|AR|AZ|CA|CO|CT|DC|DE|FL|GA|HI|IA|ID|IL|IN|KS|KY|LA|MA|MD|ME|MI|MN|MO|MS|MT|NC|ND|NE|NH|NJ|NM|NV|NY|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VA|VT|WA|WI|WV|WY)$' # check the cloudflare header for region
# acl northamerica_ipregioncode_acl hdr(cf-region-code) -m reg '^(AK|AL|AR|AZ|CA|CO|CT|DC|DE|FL|GA|HI|IA|ID|IL|IN|KS|KY|LA|MA|MD|ME|MI|MN|MO|MS|MT|NC|ND|NE|NH|NJ|NM|NV|NY|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VA|VT|WA|WI|WV|WY)$' # check the cloudflare header for region
# acl northamerica_ipcountry_acl hdr(Cdn-Requestcountrycode) -i GB,US,CA,MX,BR,AR,CL,CO,PE,VE,UY # check the bunny header for country
use_backend northamerica_backend if northamerica_ipcountry_acl
# use_backend northamerica_backend if is_prebid_url europe_ipcountry_acl
South America
# acl europe_ipcountry_acl hdr(cf-ipcountry) -i GB # check the cloudflare header for country
acl southamerica_ipcountry_acl hdr(cf-ipcountry) -m reg '^(AR|BO|BR|CL|CO|EC|GY|PY|PE|SR|UY|VE)$'
# acl europe_ipcity_acl hdr(cf-ipcity) -i Bristol # check the cloudflare header for city
# acl europe_ipregion_acl hdr(cf-region) -i England # check the cloudflare header for city
# acl europe_ipregioncode_acl hdr(cf-region-code) -i ENG # check the cloudflare header for city
# acl europe_ipcountry_acl hdr(Cdn-Requestcountrycode) -i GB,US,CA,MX,BR,AR,CL,CO,PE,VE,UY # check the bunny header for country
use_backend southamerica_backend if southamerica_ipcountry_acl
# use_backend northamerica_backend if is_prebid_url europe_ipcountry_acl
Europe
# acl europe_ipcountry_acl hdr(cf-ipcountry) -i GB # check the cloudflare header for country
acl europe_ipcountry_acl hdr(cf-ipcountry) -m reg '^(PL|CZ|HU|SK|UA|RO|BG|GR|RS|HR|SI|MK|BA|ME|MD|BY|AF|CI|GB|FR|DE|NL|PT|IT|ES|BE|AT|CH|LU|IE|DK|NO|SE|EE|LT|LV)$'
# acl europe_ipcity_acl hdr(cf-ipcity) -i Bristol # check the cloudflare header for city
# acl europe_ipregion_acl hdr(cf-region) -i England # check the cloudflare header for city
# acl europe_ipregioncode_acl hdr(cf-region-code) -i ENG # check the cloudflare header for city
# acl europe_ipcountry_acl hdr(Cdn-Requestcountrycode) -i GB,US,CA,MX,BR,AR,CL,CO,PE,VE,UY # check the bunny header for country
use_backend europe_backend if europe_ipcountry_acl
# use_backend northamerica_backend if is_prebid_url europe_ipcountry_acl
Africa
# acl europe_ipcountry_acl hdr(cf-ipcountry) -i GB # check the cloudflare header for country
acl africa_ipcountry_acl hdr(cf-ipcountry) -m reg '^(DZ|AO|BJ|BW|BF|BI|CM|CV|CF|TD|KM|CG|CD|DJ|EG|GQ|ER|SZ|ET|GA|GH|GN|GW|KE|LS|LR|LY|ML|MA|MR|MU|YT|MW|NE|NG|RE|RW|ST|SN|SC|SL|SO|ZA|SS|SD|TZ|TG|TN|UG|ZM|ZW)$'
# acl europe_ipcity_acl hdr(cf-ipcity) -i Bristol # check the cloudflare header for city
# acl europe_ipregion_acl hdr(cf-region) -i England # check the cloudflare header for city
# acl europe_ipregioncode_acl hdr(cf-region-code) -i ENG # check the cloudflare header for city
# acl europe_ipcountry_acl hdr(Cdn-Requestcountrycode) -i GB,US,CA,MX,BR,AR,CL,CO,PE,VE,UY # check the bunny header for country
use_backend africa_backend if africa_ipcountry_acl
# use_backend northamerica_backend if is_prebid_url europe_ipcountry_acl
Middle East
# acl europe_ipcountry_acl hdr(cf-ipcountry) -i GB # check the cloudflare header for country
acl middleeast_ipcountry_acl hdr(cf-ipcountry) -m reg '^(AE|AM|BH|CY|GE|IQ|IL|JO|KW|LB|OM|PS|QA|SA|SY|TR|YE)$'
# acl europe_ipcity_acl hdr(cf-ipcity) -i Bristol # check the cloudflare header for city
# acl europe_ipregion_acl hdr(cf-region) -i England # check the cloudflare header for city
# acl europe_ipregioncode_acl hdr(cf-region-code) -i ENG # check the cloudflare header for city
# acl europe_ipcountry_acl hdr(Cdn-Requestcountrycode) -i GB,US,CA,MX,BR,AR,CL,CO,PE,VE,UY # check the bunny header for country
use_backend middleeast_backend if middleeast_ipcountry_acl
# use_backend northamerica_backend if is_prebid_url europe_ipcountry_acl
Asia
# acl europe_ipcountry_acl hdr(cf-ipcountry) -i GB # check the cloudflare header for country
acl asia_ipcountry_acl hdr(cf-ipcountry) -m reg '^(CN|JP|KR|TW|ID|MY|SG|PH|TH|IN|PK|BD|LK|NP|MV|FI|VN|MM|MO|BN)$'
# acl europe_ipcity_acl hdr(cf-ipcity) -i Bristol # check the cloudflare header for city
# acl europe_ipregion_acl hdr(cf-region) -i England # check the cloudflare header for city
# acl europe_ipregioncode_acl hdr(cf-region-code) -i ENG # check the cloudflare header for city
# acl europe_ipcountry_acl hdr(Cdn-Requestcountrycode) -i GB,US,CA,MX,BR,AR,CL,CO,PE,VE,UY # check the bunny header for country
use_backend asia_backend if asia_ipcountry_acl
# use_backend northamerica_backend if is_prebid_url europe_ipcountry_acl
Oceania
# acl europe_ipcountry_acl hdr(cf-ipcountry) -i GB # check the cloudflare header for country
acl oceania_ipcountry_acl hdr(cf-ipcountry) -m reg '^(AU|FJ|KI|MH|FM|MP|NR|NZ|PW|PG|SB|TO|TV|VU)$'
# acl europe_ipcity_acl hdr(cf-ipcity) -i Bristol # check the cloudflare header for city
# acl europe_ipregion_acl hdr(cf-region) -i England # check the cloudflare header for city
# acl europe_ipregioncode_acl hdr(cf-region-code) -i ENG # check the cloudflare header for city
# acl europe_ipcountry_acl hdr(Cdn-Requestcountrycode) -i GB,US,CA,MX,BR,AR,CL,CO,PE,VE,UY # check the bunny header for country
use_backend oceania_backend if oceania_ipcountry_acl
# use_backend northamerica_backend if is_prebid_url europe_ipcountry_acl
# Default backend for if no country
default_backend europe_backend
example backend, they are all the same except the server url obviously:
I’m actually starting to think this might actually be the stats system not working properly, on reboots to test, stats sort of come (show) and go randomly. Anyone seen anything like this?