ltsecurityinc安防产品在线商城代码
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "magento/module-csp-config",
|
||||
"description": "test csp module",
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
},
|
||||
"require": {
|
||||
"php": "~7.4.0||~8.0.0",
|
||||
"magento/framework": "*",
|
||||
"magento/module-integration": "*"
|
||||
},
|
||||
"type": "magento2-module",
|
||||
"extra": {
|
||||
"map": [
|
||||
[
|
||||
"*",
|
||||
"Magento/TestModuleCspConfig"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp/etc/csp_whitelist.xsd">
|
||||
<policies>
|
||||
<policy id="object-src">
|
||||
<values>
|
||||
<value id="example-base" type="host">example.magento.com</value>
|
||||
<value id="mage-base" type="host">https://admin.magento.com</value>
|
||||
</values>
|
||||
</policy>
|
||||
<policy id="media-src">
|
||||
<values>
|
||||
<value id="example-base" type="host">example.magento.com</value>
|
||||
<value id="mage-base" type="host">https://admin.magento.com</value>
|
||||
</values>
|
||||
</policy>
|
||||
</policies>
|
||||
</csp_whitelist>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp/etc/csp_whitelist.xsd">
|
||||
<policies>
|
||||
<policy id="object-src">
|
||||
<values>
|
||||
<value id="mage-base" type="host">https://magento.com</value>
|
||||
<value id="hash" type="hash" algorithm="sha256">B2yPHKaXnvFWtRChIbabYmUBFZdVfKKXHbWtWidDVF8=</value>
|
||||
<value id="hash2" type="hash" algorithm="sha256">B2yPHKaXnvFWtRChIbabYmUBFZdVfKKXHbWtWidDVF9=</value>
|
||||
</values>
|
||||
</policy>
|
||||
<policy id="media-src">
|
||||
<values>
|
||||
<value id="mage-base" type="host">https://magento.com</value>
|
||||
<value id="devdocs-base" type="host">https://devdocs.magento.com</value>
|
||||
</values>
|
||||
</policy>
|
||||
</policies>
|
||||
</csp_whitelist>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
-->
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
|
||||
<module name="Magento_TestModuleCspConfig" active="true" />
|
||||
</config>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
use Magento\Framework\Component\ComponentRegistrar;
|
||||
|
||||
$registrar = new ComponentRegistrar();
|
||||
if ($registrar->getPath(ComponentRegistrar::MODULE, 'Magento_TestModuleCspConfig') === null) {
|
||||
ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_TestModuleCspConfig', __DIR__);
|
||||
}
|
||||
Reference in New Issue
Block a user