flancer32/mage2_ext_csp
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
flancer32/mage2_ext_csp 适用场景与选型建议
flancer32/mage2_ext_csp 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 51.96k 次下载、GitHub Stars 达 56, 最近一次更新时间为 2020 年 05 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 flancer32/mage2_ext_csp 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 flancer32/mage2_ext_csp 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 51.96k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 56
- 点击次数: 41
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-only
- 更新时间: 2020-05-13
