How to modify over 20000 pages for ip range?

Hi all!
I have the site with about 20000 pages. I want to modify pages content just for some ip address ranges and not for all. Can i do this with CloudFlare?
Thanks for reply

You could do this on Cloudflare with Workers and custom JavaScript code where you check for the client’s IP address and if it matches you make the applicable changes.

Keep in mind, if you exceed the limits of the free plan you’ll need to go for the paid option.

Thanks, sandro. Will the user be able to analyze this JavaScript (in browser developer mode) and figure out the substitution?

No, because that code will not be delivered to the user but only runs on Cloudflare’s side on the proxies.

No, users cannot see worker code. It’s ran on Cloudflare’s edge server.

Here is an example of rewriting HTML with it: https://developers.cloudflare.com/workers/examples/rewrite-links

Sandro, Walshy, i’ll try. Thanks!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.