PHP code example of bepsvpt / secure-headers

1. Go to this page and download the library: Download bepsvpt/secure-headers 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/ */

    

bepsvpt / secure-headers example snippets


Bepsvpt\SecureHeaders\SecureHeadersServiceProvider::class,

\Bepsvpt\SecureHeaders\SecureHeadersMiddleware::class,

$app->register(Bepsvpt\SecureHeaders\SecureHeadersServiceProvider::class);

$app->middleware([
   \Bepsvpt\SecureHeaders\SecureHeadersMiddleware::class,
]);



use \Bepsvpt\SecureHeaders\SecureHeaders;



// instantiate the class by fromFile static method
$secureHeaders = SecureHeaders::fromFile('/path/to/secure-headers.php');

// or instantiate the class directly
$config = 

// Get headers
$secureHeaders->headers();

// Send headers to HTTP response
$secureHeaders->send();
sh
php artisan vendor:publish --provider="Bepsvpt\SecureHeaders\SecureHeadersServiceProvider"
sh
mkdir config
cp vendor/bepsvpt/secure-headers/config/secure-headers.php config/secure-headers.php