flancer32/mage2_ext_csp
最新稳定版本:0.0.6
Composer 安装命令:
composer require flancer32/mage2_ext_csp
包简介
Magento 2 module to collect CSP violations reports and to eliminate JS console warnings.
README 文档
README
Module to collect CSP violations reports and convert it to the CSP rules.
Attention! Starting from version 0.0.5 module's functionality is disabled by default. You need explicitly enable module in Stores / Configuration / Security / CSP / General.
Description
There are a lot of Content Security Policy (CSP) warnings in Javascript console for Magento 2.3.5+:
This module adds report-uri ...; directive to CSP header, collects reports (separately for admin & front areas) then generates new rules to eliminate CSP warnings in console. Cron tasks to analyze reports & generate rules starts hourly.
The main goal of this module is to remove CSP errors from JS console completely but you can use this module to collect reports only (just disable activation for new rules in config).
You can switch CSP from report only to strict mode (set Report Only to false in config) after all violation reports will be converted to the rules and all not-allowed content will be locked by browser.
Installation
composer.json
"require": {
"flancer32/mage2_ext_csp": "*"
}
$ ./bin/magento deploy:mode:set developer $ composer require flancer32/mage2_ext_csp $ ./bin/magento setup:upgrade $ ./bin/magento deploy:mode:set production $ ./bin/magento cache:clean
Docs
统计信息
- 总下载量: 47.74k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 55
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-only
- 更新时间: 2020-05-13
