Skip to content

This is a nginx+php based standard Squid/Varnish purge request converter for Cloudflare.

License

Notifications You must be signed in to change notification settings

moegirlwiki/CloudflarePurgeGateway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

This is a nginx+php based standard Squid/Varnish purge request converter for Cloudflare.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages