I have created a Cloudflare firewall rule to block the “mod_pagespeed” admin area to all countries except my country by using the following filter. But this filter not working as I expected. It blocked my country too.
(http.request.uri.path contains “/ngx_pagespeed_statistics”) or (http.request.uri.path contains “/ngx_pagespeed_global_statistics”) or (http.request.uri.path contains “/ngx_pagespeed_message”) or (http.request.uri.path contains “/pagespeed_admin/”) or (http.request.uri.path contains “/pagespeed_global_admin/” and ip.geoip.country ne “LK”)
But if I change that filter like follows via the Expression editor it works as I expected.
((http.request.uri.path contains “/ngx_pagespeed_statistics”) or (http.request.uri.path contains “/ngx_pagespeed_global_statistics”) or (http.request.uri.path contains “/ngx_pagespeed_message”) or (http.request.uri.path contains “/pagespeed_admin/”) or (http.request.uri.path contains “/pagespeed_global_admin/”)) and ip.geoip.country ne “LK”
How do I do create the above corrected filter using “Expression Builder”.