PHP code example of itox-gmbh / laravel-security

1. Go to this page and download the library: Download itox-gmbh/laravel-security 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/ */

    

itox-gmbh / laravel-security example snippets


'enforceSSL' => true,
    'headers' => [
        'hsts' => true,
        'x-frame-options' => 'SAMEORIGIN',
        'x-content-type-options' => 'nosniff',
        'x-xss-protection' => '1; mode=block',
        'permissions-policy' => 'camera=(), microphone=(), geolocation=(), fullscreen=(self), payment=(), accelerometer=(), gyroscope=()',
        'feature-policy' => "camera 'none'; microphone 'none'; geolocation 'none'; fullscreen 'none'; payment 'none'; accelerometer 'none'; gyroscope 'none';",
    ],

bash
php artisan security:install