WordPress plugin intelligence profile

Bypass Guard for Cloudflare

Blocks requests that bypass Cloudflare by requiring a secret token header. For hosts that offer no stronger origin protection.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 7.1
Current version1.0.0
WordPress coverageTested up to WordPress 7.1
Minimum stackWP 6.2 · PHP 7.4
Directory statusactive
Last directory update5 Oct 202627d ago
Active installationsNewAdoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Bypass Guard for Cloudflare version 1.0.0 as active, updated 27d ago and tested up to WordPress 7.1.

Overview

About this plugin

The problem

Cloudflare protects your site only for traffic that goes through Cloudflare. If your server’s IP address leaks, attackers can send requests to it directly and skip Cloudflare’s protection entirely. The usual fixes require server or firewall access, which shared hosting providers often don’t give you.

The solution

Bypass Guard uses a shared secret to tell proxied traffic from direct traffic:

  • The plugin generates a random secret token.
  • You add a rule in Cloudflare that attaches this token to every request it forwards, in a header called BYPASS-GUARD-TOKEN.
  • The plugin checks each WordPress request. If the header is missing or wrong, the request is answered with 403 Forbidden.

Because the header is added at Cloudflare’s edge, a request that hits the origin directly arrives without it, unless the sender already knows the token.

Built-in safety against locking yourself out

  • The filter cannot be switched on until the plugin has seen at least one request carrying the correct token. This proves your Cloudflare rule works before anything gets blocked.
  • Until then, the settings page shows a step by step setup guide with copy buttons for the header name and token.
  • WP-CLI commands are never filtered, so you always keep command line access.
  • Deactivating the plugin always switches the filter off.

Logging

Every blocked request is logged with its date and time, IP address, request method, URL and user agent. You can view and clear the log on the settings page. This helps you confirm that the filter works, spot scanners that found your server’s IP, and find legitimate services that were blocked by mistake.

The log keeps the 500 most recent entries, so a flood of requests cannot fill your database. Token values are never logged, not even incorrect ones.

The logged IP address is the one that actually connected to your server. Headers such as CF-Connecting-IP or X-Forwarded-For are ignored for blocked requests, because anyone bypassing Cloudflare can set them to any value.

Is this plugin right for you?

This plugin is a fallback for when better options are not available. Check with your host whether you can use either of these first:

  • Authenticated Origin Pulls (mutual TLS): your web server only accepts connections that present Cloudflare’s client certificate.
  • A firewall that only allows Cloudflare’s IP ranges: your server refuses connections from anywhere else.

Both work at the server or network level, protect everything (including images and cached pages) and do not depend on a shared secret. Many shared hosting plans allow neither, and that is the situation this plugin is built for. You can also use it alongside them as an extra layer.

Limitations

The plugin runs inside WordPress, so it only sees requests that WordPress itself handles:

  • Static files (images, CSS, JavaScript, uploads) are usually served directly by the web server and stay reachable.
  • Page caches that run before plugins load are not filtered. This includes caching plugins using an advanced-cache.php drop-in and server-level caches such as LiteSpeed Cache, Varnish or nginx FastCGI cache. Cached pages may still be served to direct requests.
  • The token is a shared secret. Anyone who learns it can get past the filter. It is visible to site administrators, to anyone with database access and to anyone with access to your Cloudflare account.

htaccess file, checking the same header there as well closes the first two gaps.

Source code and contributions

Bypass Guard for Cloudflare is developed openly on GitHub. Bug reports, feature requests and pull requests are welcome:

com/agabor/bypass-guard-for-cloudflare

Disclaimer

Bypass Guard for Cloudflare is an independent open source project. It is not affiliated with, endorsed by or supported by Cloudflare, Inc. “Cloudflare” is a trademark of Cloudflare, Inc.

and is used here only to describe the service this plugin works with. No Cloudflare logos, artwork or documentation are included in this plugin.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • cloudflare
  • firewall
  • header
  • origin
  • security
Compatibility & maintenance

Compatibility & maintenance

Tested with WP 7.1

Marked as tested with the current WordPress 7.1 release.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to7.1
Minimum requirementsWordPress 6.2 · PHP 7.4
Update activity5 Oct 202627d ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.