user3211618
user3211618

Reputation: 1

Is Cloudflare bypassing IP restrictions implemented in .htaccess?

I think that Cloudflare bypass my custom htaccess rules. Is it true?

I had some IP restrictions in htaccess but they are bypassed. Plus, my Expired Rules (for caching) I think that they aren't working. I am trying to check that from redbot.org that tell me that: "Pragma: no-cache is a request directive, not a response directive."

Thanks

Upvotes: -1

Views: 6569

Answers (1)

Ned Martin
Ned Martin

Reputation: 522

Cloudflare will request resources (such as web pages) from your server using its IP, not the client's IP. So, if you have some IP restrictions which you expect to work based on the client IP, then instead your .htaccess will be seeing Cloudflare's IP, not the client IP.

Cloudlfare have posted some answers on how to modify certain web servers so that the original client IP is again the IP you get, rather than Cloudflare's IP. See https://support.cloudflare.com/hc/en-us/sections/200038166-How-do-I-restore-original-visitor-IP-to-my-server-logs- for more information.

Upvotes: 4

Related Questions