Can we add security rule based on PX value?

I want to create a rule on mobile and desktop side. I can do this with the user-agent, but it would be a very risky and laborious process.

For this reason, can I create a rule based on screen width? For example, can I create a rule for users whose screen width is smaller than 400px?

This is not something that you easily do, as Cloudflare doesn’t know the screen width of the devices that are connecting. You could make some JavaScript on your site to redirect user based on screen size

1 Like