1. Go to this page and download the library: Download mahdimajidzadeh/ds 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/ */
mahdimajidzadeh / ds example snippets
// in your CSP middleware
$nonce = Vite::useCspNonce(); // generates one; or pass your own
$response = $next($request);
$response->headers->set('Content-Security-Policy', "script-src 'self' 'nonce-{$nonce}' 'unsafe-eval'; style-src 'self' 'unsafe-inline'");