PHP code example of phattarachai / laravel-cloudflare
1. Go to this page and download the library: Download phattarachai/laravel-cloudflare library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
phattarachai / laravel-cloudflare example snippets
'waf' => [
'rules' => [
// declarative — scoped to this app's host automatically
['tag' => 'admin-challenge', 'paths' => ['/admin']],
// raw — pin every env host so all deploys upsert the SAME rule and converge
// ['tag' => 'admin-challenge', 'expression' => '(starts_with(http.request.uri.path, "/admin")) and (http.host in {"backend-prod.example.com" "backend-qas.example.com"})'],
],
],