xqus / php-waf
PHP Web Application Firewall
dev-master
2023-04-24 19:53 UTC
Requires
- php: >=7.0
Requires (Dev)
- phpunit/phpunit: 10
This package is auto-updated.
Last update: 2024-12-24 23:40:31 UTC
README
PHP Web Application Firewall
Requirements
- PHP >= 7.0
Installation
composer require xqus/php-waf
How to use
-
Create a PHP script to start the Firewall instance
- waf.php
<?php $waf = new \xqus\PhpWaf\Firewall(); $waf->run();
-
Configure your web server
- Apache (.htaccess)
php_value auto_prepend_file "/path/to/waf.php"
- Nginx
fastcgi_param PHP_VALUE "auto_prepend_file=/path/to/waf.php";