Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 1.68 KB

README.md

File metadata and controls

26 lines (19 loc) · 1.68 KB

CloudflarePurgeGateway

  • This is a nginx+php based standard Squid/Varnish purge request converter for Cloudflare, in EXPERIMENTAL.
  • Although we develop this program toward MediaWiki as a substitute of https://github.com/moegirlwiki/MW-Cloudflare/ for backward compatibility, It works with any project using standard Squid/Varnish purge request.

Dependency

  • nginx
  • PHP

Install

  • Set up a nginx v-config monitor port other than 80,443. (e.g. 8080) Set the root path to /cf_purge_gw.
  • compsoer install.

Configuration

Security Issue

  • At the time we wrote this intro, Cloudflare only offers GLOBAL API KEY toward users not in "Enterprise plan"($5000+). It is possible to acquire original server IP and tons other sensitive info via GLOBAL API KEY. Therefore, it is highly suggested to set config.php with permission 400, and store it in a place not public (not accessible by nginx).
  • Limit access to the port with strict firewall rules.
  • Cloudflare SDK(and other components by composer) should be updated regularly.

USE AT YOUR OWN RISK!