承接 brocode/module-scoped-csp 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

brocode/module-scoped-csp

最新稳定版本:1.0.0

Composer 安装命令:

composer require brocode/module-scoped-csp

包简介

CSP extension module to provided store scopes for CSP settings in Magento 2

README 文档

README

This module provides an additional configuration possibility for CSP whitelists with scope definition (website, store or storeview).

"Buy Me A Coffee"

Installation

composer require brocode/module-scoped-csp
bin/magento setup:upgrade

The module should be enabled by default and does not need separate enabling.

Configuration

Add a scoped_csp_whitelist.xml into your etc-folder containing all needed policies.

Sample scoped_csp_whitelist.xml:

<?xml version="1.0" encoding="UTF-8"?>
<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:module:BroCode_ScopedCsp:etc/scoped_csp_whitelist.xsd">
        <policies>
            <policy id="img-src">
                <values>
                    <value id="data-brocode" scopeType="website" scopeCode="base" type="host">https://brocode.at</value>
                    <value id="data-other-brocode" scopeType="website" scopeCode="otherbase" type="host">https://other.brocode.at</value>
                </values>
            </policy>
        </policies>
</csp_whitelist>

If no scope type is given, the policy is applied to all scopes (so basically the same behavior as the default csp_whitelist.xml).

If a scope type other then default is given, a scope code must be set as well.

TODOs

  • use XSD schema extension instead of XSD copy and extend of original csp_whitelist.xsd

统计信息

  • 总下载量: 487
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-26