Skip to content

Commit f834738

Browse files
committed
OWN-166 Breaks Magento compilation without Composer development dependencies
1 parent 29b4e60 commit f834738

15 files changed

+1
-213
lines changed

README.md

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +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-
$ composer require flancer32/mage2_ext_csp
24-
```
25-
26-
27-
## Docs
28-
29-
- [Configuration](./docs/user/config.md)
30-
- Grids:
31-
- [Violations reports](./docs/user/grid/reports.md)
32-
- [CSP rules](./docs/user/grid/rules.md)
33-
- [CLI](./docs/user/command.md)
34-
- [Cron](./docs/user/cron.md)
35-
- [DB structure](./docs/dev/db_struct.md)
4+
See more at https://github.com/flancer32/mage2_ext_csp

dev/Model/Collector/DbTest.php

Lines changed: 0 additions & 30 deletions
This file was deleted.

dev/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

dev/phpunit_bootstrap.php

Lines changed: 0 additions & 77 deletions
This file was deleted.

docs/dev/db_struct.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/img/fl32_csp_db_struct.png

-26.5 KB
Binary file not shown.

docs/img/js_console_errors.png

-103 KB
Binary file not shown.

docs/img/user_config.png

-91.9 KB
Binary file not shown.

docs/img/user_grid_reports.png

-40.4 KB
Binary file not shown.

docs/img/user_grid_rules.png

-32.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)