Skip to content

Commit 38c4fd4

Browse files
committed
OWN-172 CSP module: process data rules
1 parent 7e71506 commit 38c4fd4

File tree

1 file changed

+1
-37
lines changed

1 file changed

+1
-37
lines changed

README.md

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,4 @@
11
# mage2_ext_csp
22
Module to collect CSP violations reports and convert it to the CSP rules.
33

4-
## Description
5-
There are a lot of [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) (CSP) warnings in Javascript console for Magento 2.3.5+:
6-
![](./docs/img/js_console_errors.png)
7-
8-
This module adds `report-uri ...;` directive to CSP header, collects [reports](./docs/user/grid/reports.md) (separately for admin & front areas) then generates new [rules](./docs/user/grid/rules.md) to eliminate CSP warnings in console. Cron tasks to analyze reports & generate rules starts hourly.
9-
10-
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](./docs/user/config.md)).
11-
12-
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.
13-
14-
## Installation
15-
`composer.json`
16-
```
17-
"require": {
18-
"flancer32/mage2_ext_csp": "*"
19-
}
20-
```
21-
22-
```shell script
23-
$ ./bin/magento deploy:mode:set developer
24-
$ composer require flancer32/mage2_ext_csp
25-
$ ./bin/magento setup:upgrade
26-
$ ./bin/magento deploy:mode:set production
27-
$ ./bin/magento cache:clean
28-
```
29-
30-
31-
## Docs
32-
33-
- [Configuration](./docs/user/config.md)
34-
- [Usage strategy](./docs/user/strategy.md)
35-
- Grids:
36-
- [Violations reports](./docs/user/grid/reports.md)
37-
- [CSP rules](./docs/user/grid/rules.md)
38-
- [CLI](./docs/user/command.md)
39-
- [Cron](./docs/user/cron.md)
40-
- [DB structure](./docs/dev/db_struct.md)
4+
See more at https://github.com/flancer32/mage2_ext_csp

0 commit comments

Comments
 (0)