xqus / php-waf
PHP Web Application Firewall
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 13
pkg:composer/xqus/php-waf
Requires
- php: >=7.0
Requires (Dev)
- phpunit/phpunit: 10
This package is auto-updated.
Last update: 2025-10-25 01:30:56 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";
Available filters
| Filter | Description |
|---|---|
| SQL | Prevent SQL Injections |
| XSS | XSS Attacks |
| XML | Stops XML Attacks |