xqus/php-waf

PHP Web Application Firewall

dev-master 2023-04-24 19:53 UTC

This package is auto-updated.

Last update: 2024-12-24 23:40:31 UTC


README

License

PHP Web Application Firewall

Requirements

  • PHP >= 7.0

Installation

composer require xqus/php-waf

How to use

  1. Create a PHP script to start the Firewall instance

    • waf.php
    <?php
    $waf = new \xqus\PhpWaf\Firewall();
    $waf->run();
  2. 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