PHP code example of snicco / default-headers-middleware

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

    

snicco / default-headers-middleware example snippets


// In your container definitions
use Snicco\Middleware\DefaultHeaders\DefaultHeaders;

$default_headers = new DefaultHeaders([
    'X-Content-Type-Options' => 'nosniff' // key value pairs or header names and values.
])