orba/module-csp

此包已被废弃且不再维护。作者建议使用 lingaro/module-csp 包。

Orba CSP 模块

安装次数: 2,711

依赖项: 0

建议者: 0

安全: 0

星标: 1

关注者: 4

分支: 0

开放性问题: 0

类型:magento2-module

0.1.0 2020-05-25 09:16 UTC

This package is auto-updated.

Last update: 2023-06-07 10:59:23 UTC


README

此模块在以下方面扩展了 Magento_Csp:

  • 允许将 CSP 违规报告保存到日志文件中
  • 添加缺失的 CSP 规则

它在不损害安全性的情况下改进了 Magento CSP 框架。

由于使用了 CSP 违规报告记录器,因此您不需要外部服务进行报告。

CSP 违规报告

如果启用配置 安全 > Orba CSP > 一般配置 > 使用内置报告 并且在 csp_whitelist.xml 中未指定 report-uri,则 CSP 违规报告将被发送到端点 /csp/report/ 并保存在 var/log/csp.log

注意:此功能仅在您未在 csp_whitelist.xml 中指定不同的 report-uri 时才有效,否则将被忽略。

可以通过 商店 > 配置 > 安全 > Orba CSP > 一般配置 中的链接下载日志文件。

附加 CSP 规则

该模块将额外的资源(如 fonts.googleapis.comwww.google.com/recaptcha/)列入白名单。

安装

composer require orba/module-csp
bin/magento module:enable Orba_Csp
bin/magento setup:upgrade

配置

安全 > Orba CSP > 一般配置 > 使用内置报告 - 如果启用且在 csp_whitelist.xml 中未指定 report-uri,则 CSP 违规报告将被发送到端点 /csp/report/ 并保存到日志文件中。