superb-code / module-content-security
Content Security
Installs: 677
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:magento2-module
Requires
- magento/module-cms: *
This package is auto-updated.
Last update: 2025-05-01 00:17:57 UTC
README
Install via composer (recommend)
Run the following command in Magento 2 root folder:
composer require superb-code/module-content-security
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
Environment variables usage (app/etc/env.php)
superb/content_security/escape_config
- escape config, see example belowsuperb/content_security/escape_debug_log_enabled
- enable/disable debug log. Helps to identify used blocks
'superb' => [
'content_security' => [
'escape_debug_log_enabled' => true,
'escape_config' => [
'checkout_index_index' => [//full action name
'enabled' => true,
'allowed_tags' => [
'div',
'p',
'a',
'ul',
'li',
'h1',
'h2',
'h3',
'h4',
'h5',
'h6'
],
'allowed_attributes' => [
'id',
'class',
'style',
'src',
'href'
]
],
'footer_bottom_links' => [//static block identifier
'enabled' => true,
'allowed_tags' => [
'div',
'p',
'a',
'ul',
'li',
'h1',
'h2',
'h3',
'h4',
'h5',
'h6'
],
'allowed_attributes' => [
'id',
'class',
'style',
'src',
'href'
]
]
]
]
]