Skip to content

SoleGraphics/wp-cloudflare-ip-rewrite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WP Cloudflare IP Rewrite

A simple, drop in plugin to get the correct client IP behind CloudFlare.

Installation

Just download drop this folder in your /plugins/ directory and activate it.

How it works

It checks if the REMOTE_ADDR is from CloudFlare (for security) and then sets REMOTE_ADDR to HTTP_CF_CONNECTING_IP to ensure we get the real client IP.

Todos

It would be nice if the plugin was self-maintaining for getting authorized CloudFlare IP's. We should update the $cf_ipv4 and $cf_ipv6 arrays to fetch them on a nightly cron and store as a transient.

Credits

This is 98% CloudFlare's IP Rewrite Package, just wrapped into a WP Plugin that we can later extend.

About

WordPress plugin to get the correct client IP behind cloudflare.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages