Skip to content

Commit 5ec41ad

Browse files
authored
Info about fork, yes, it works! :)
1 parent 1f8c682 commit 5ec41ad

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
# mod_cloudflare for Apache #
22
Copyright CloudFlare Inc. 2016
33

4+
Modded by p0358
5+
6+
## FORK INFO ##
7+
8+
This fork adds `CLOUDFLARE_CONNECTION` env variable set to "true" if connection originated from one of module's trusted proxy IPs. It is very useful since you cannot add `DenyAllButCloudflare` directive everywhere, but instead you can now use `Require env CLOUDFLARE_CONNECTION` or `Require expr "-T env('CLOUDFLARE_CONNECTION')"` (the latter example provided if you want to mix it with other expressions, you could also consider the first one inside `RequireAll` block instead).
9+
10+
To use it (replacing the original mode if you already use it), simply clone it and use instructions from below. On Ubuntu/Debian you can just execute:
11+
12+
git clone https://github.com/p0358/mod_cloudflare.git
13+
cd mod_cloudflare
14+
apt install apache2-dev
15+
apxs2 -a -i -c mod_cloudflare.c
16+
service apache2 restart
17+
18+
419
## mod_cloudflare.c ##
520

621
Based on mod_remoteip.c, this Apache extension will replace the remote_ip variable in user's logs with the correct remote IP sent from CloudFlare. The module only performs the IP substitution for requests originating from CloudFlare IPs by default.

0 commit comments

Comments
 (0)