PHP Classes

File: tests/firewall.php

Recommend this page to a friend!
  Classes of Ali YILMAZ   Mind Framework   tests/firewall.php   Download  
File: tests/firewall.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Mind Framework
Framework that implements several design patterns
Author: By
Last change:
Date: 2 years ago
Size: 1,267 bytes
 

Contents

Class file image Download
<?php

require_once '../src/Mind.php';

$conf = array(
   
'db'=>[
       
'drive' => 'mysql',
       
'host' => 'localhost',
       
'dbname' => 'mydb',
       
'username' => 'root',
       
'password' => ''
   
],
   
'firewall' => array(
       
// 'noiframe' => false,
        // 'nosniff' => false,
        // 'noxss' => false,
        // 'ssl' => false,
        // 'hsts' => false,
        // 'csrf' => false,
        // 'csrf' => true,
        // 'csrf' => array('limit'=>150),
        // 'csrf' => array('name'=>'_token'),
        // 'csrf' => array('name'=>'_token', 'limit'=>150),
       
'allow' => [
           
'platform'=>'Windows', // ['Windows', 'Linux', 'Darwin']
           
'browser'=>'Chrome', // ['Chrome', 'Firefox'],
           
'ip'=>'127.0.0.1', // ['192.168.2.200', '192.168.2.201', '222.222.222.222']
       
],
       
// 'deny' => [
        // 'platform'=>'Linux', // ['Windows', 'Linux', 'Darwin']
        // 'browser'=>'Firefox', // ['Chrome', 'Firefox'],
        // 'ip'=>'127.0.0.2', // ['192.168.2.200', '192.168.2.201', '222.222.222.222']
        // ],

   
)
);

$Mind = new Mind($conf);

echo
'It is open to remote access.';

?>