php-csp-nonce-source:PHP的CSP(内容安全策略)随机数源

时间:2021-05-24 06:53:14
【文件属性】:
文件名称:php-csp-nonce-source:PHP的CSP(内容安全策略)随机数源
文件大小:28KB
文件格式:ZIP
更新时间:2021-05-24 06:53:14
php csp PHP 用于PHP的CSP现时源 用于PHP的CSP(内容安全策略)随机数源库。 什么是CSP随机数来源? 它是防止XSS的CSP 2功能之一。 如果您不知道,请参阅 。 要求 PHP 5.4或更高版本 安装 $ git clone https://github.com/kenjis/php-csp-nonce-source.git $ cd php-csp-nonce-source $ composer install 用法 您只需调用Csp::sendHeader()和Csp::getNonce() 。 Csp::sendHeader()发送CSP标头。 Csp::getNonce()返回随机数值。 <?php require __DIR__ . '/bootstrap.php' ; Csp :: sendHeader (); ?> <!DOCTYPE html > < htm
【文件预览】:
php-csp-nonce-source-master
----.scrutinizer.yml(56B)
----csp-report.php(324B)
----src()
--------Csp()
----.travis.yml(348B)
----composer.lock(40KB)
----LICENSE.md(1KB)
----README.md(3KB)
----index.php(378B)
----check()
--------index.html(427B)
--------src-unsafe-inline-nonce.php(471B)
--------src-nonce.php(657B)
----tests()
--------bootstrap_phpunit.php(384B)
--------src()
--------phpunit.xml(531B)
--------test.sh(71B)
----.gitignore(55B)
----bootstrap.php(99B)
----bin()
--------check-csp-header.php(1KB)
----composer.json(807B)
----server.sh(33B)

网友评论