tombonez / wp-rocket-bunny-net-edge-caching-helper
A WordPress plugin for purging bunny.net's cache after clearing WP Rockets and protecting against direct server access when using bunny.net as a reverse proxy.
Installs: 205
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 1
Open Issues: 3
Type:wordpress-plugin
Requires
- php: >=7.0
Requires (Dev)
- dealerdirect/phpcodesniffer-composer-installer: ^0.7.1
- roave/security-advisories: dev-latest
- wp-coding-standards/wpcs: ^2.3
This package is auto-updated.
Last update: 2024-03-23 09:58:53 UTC
README
A WordPress plugin for purging bunny.net's cache after clearing WP Rockets and protecting against direct server access when using bunny.net as a reverse proxy.
Usage
WP Rocket bunny.net Cache Purging
Add the two following definitions to wp-config.php:
BUNNY_NET_API_KEY
- Your bunny.net API Key.
BUNNY_NET_PULL_ZONE_ID
- The ID of the bunny.net pull zone to purge.
Direct Server Access Protection
First, add an edge rule to your bunny.net pull zone with the following values:
Action: Set Request Header
Header name: origin-access-token
Header value: Your chosen access token value
Description: Set Origin Access Token
Condition matching: Match Any
Conditions: Request URL
Match Any
*
Second, add the following definition to wp-config.php:
BUNNY_NET_ACCESS_TOKEN
- Your chosen access token value.
License
The code is available under the MIT License.