legacybeta / cloudflare-firewall
A Laravel command to work with Cloudflare firewall rules.
Installs: 25
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 1
Forks: 1
Open Issues: 1
pkg:composer/legacybeta/cloudflare-firewall
Requires
- cloudflare/sdk: ^1.1
- illuminate/support: ^6.0|^7.0|^8.0
This package is auto-updated.
Last update: 2025-10-07 02:52:07 UTC
README
Create and Update Cloudflare Firewall Rules Based on your Laravel Application's Routes
Adds a new Laravel artisan a new command cloudflare:generate-firewall-rules
that creates or updates two rules in Cloudflare Firewall:
- Allow specific POSTs
- Block all incoming POSTs.
To install this package via composer:
- Run the commend
composer require legacybeta/cloudflare-firewall
; - Then run
php artisan vendor:publish --provider="LegacyBeta\CloudflareFirewall\CloudflareFirewallServiceProvider"
; - Put the Cloudflare API email, API key and Zone Id in the .env for your project:
CF_EMAIL=
CF_API_KEY=
CF_ZONE_ID=
Blog post with a bit more details is here.