PHP code example of vaersaagod / toolmate
1. Go to this page and download the library: Download vaersaagod/toolmate 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/ */
vaersaagod / toolmate example snippets
'csp' => [
'enabled' => true,
'enabledForCp' => false,
'reportOnly' => false,
'directives' => [
'defaultSrc' => [
"'self'",
],
'scriptSrc' => [
"'self'",
"'unsafe-inline'",
],
// Sources for stylesheets
'styleSrc' => [
"'self'",
"'unsafe-inline'",
],
// Sources for images
'imgSrc' => [
"'self'",
'https://some-project.imgix.net',
'data:'
],
// Sources for iframes
'frameSrc' => [
"'self'",
'https://www.youtube.com https://player.vimeo.com https://www.facebook.com https://www.googletagmanager.com https://bid.g.doubleclick.net',
],
// Domains that are allowed to iframe this site
'frameAncestors' => [
"'self'",
],
'baseUri' => [
"'none'",
],
'connectSrc' => [],
'fontSrc' => [
//"'self'",
],
'objectSrc' => [],
'mediaSrc' => [],
'sandbox' => [],
'reportUri' => [],
'childSrc' => [],
'formAction' => [],
'reportTo' => [],
'workerSrc' => [],
'manifestSrc' => [],
'navigateTo' => [],
],
],
{{ craft.toolmate.getCookie('testing') }}
{{ dump(craft.toolmate.getCookie('testingsecure', true)) }}