PHP code example of kanopi / firewall
1. Go to this page and download the library: Download kanopi/firewall 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/ */
kanopi / firewall example snippets
class_exists('\Kanopi\Firewall\Firewall')) {
\Kanopi\Firewall\Firewall::create([__DIR__ . '/config/firewall.yml'])->evaluate();
}
> use Symfony\Component\HttpFoundation\Request;
>
> Request::setTrustedProxies(
> ['10.0.0.0/8', '192.168.0.0/16'], // YOUR proxy CIDRs
> Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_PROTO
> );
>