You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2023/12/18 06:13:39 UTC
(struts-site) branch feature/WW-5373-report-action created (now 66ab8050b)
This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a change to branch feature/WW-5373-report-action
in repository https://gitbox.apache.org/repos/asf/struts-site.git
at 66ab8050b WW-5373 Adds a section about report action
This branch includes the following new commits:
new 66ab8050b WW-5373 Adds a section about report action
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(struts-site) 01/01: WW-5373 Adds a section about report action
Posted by lu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
lukaszlenart pushed a commit to branch feature/WW-5373-report-action
in repository https://gitbox.apache.org/repos/asf/struts-site.git
commit 66ab8050becd3513ac0ab7d8be9583f6e43242e4
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Mon Dec 18 07:13:33 2023 +0100
WW-5373 Adds a section about report action
---
source/core-developers/csp-interceptor.md | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/source/core-developers/csp-interceptor.md b/source/core-developers/csp-interceptor.md
index d112683cb..23175651f 100644
--- a/source/core-developers/csp-interceptor.md
+++ b/source/core-developers/csp-interceptor.md
@@ -31,6 +31,14 @@ CSP is now supported by all major browsers. [More information about CSP](https:/
is going to be enforced.
- `reportUri` - an uri under, which the violations have to be reported.
+## Report action
+
+To receive reports about violations against CSP an abstract `CspReportAction` action has been created, which you can
+extend to process the reports. When extending the action you must implement `processReport(String)` to process the report.
+Read JavaDoc of the action for more details.
+
+> Note: the action must always return an HTTP status `204`.
+
## Action aware
Since Struts 6.2.0 it is possible to configure the CSP interceptor by providing the an instance of `CspSettings` interface.