Restricting access to certain URI paths not working


I want to restrict access to several paths like “/admin” to certain IP addresses and defined the following rule. However, it is not working.

Zones > My Domain > Security > WAF > Custom Rules

(http.request.uri.path contains “/admin” and not ip.src in {})

Then Block

Is the following rule correct? If not, could you please help me resolve this issue?

Thank You,