Package org.eclipse.scout.rt.ui.html.csp
Class ContentSecurityPolicyReportHandler
java.lang.Object
org.eclipse.scout.rt.ui.html.AbstractUiServletRequestHandler
org.eclipse.scout.rt.ui.html.csp.ContentSecurityPolicyReportHandler
- All Implemented Interfaces:
IUiServletRequestHandler
This handler contributes to the
UiServlet
as the POST handler for /csp-report
It is used to collect Content-Security-Policy violations.
If you get a violation for content you need, make sure all your content is provided from the same origin. If this is
not possible you can change the rules by adjusting ContentSecurityPolicy
.
- Since:
- 5.2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
getReport
(jakarta.servlet.http.HttpServletRequest req) boolean
handlePost
(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) Convenience method for HTTP method POST.protected void
Methods inherited from class org.eclipse.scout.rt.ui.html.AbstractUiServletRequestHandler
handle, handleDelete, handleGet, handlePut
-
Constructor Details
-
ContentSecurityPolicyReportHandler
public ContentSecurityPolicyReportHandler()
-
-
Method Details
-
handlePost
public boolean handlePost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws IOException Description copied from class:AbstractUiServletRequestHandler
Convenience method for HTTP method POST.- Overrides:
handlePost
in classAbstractUiServletRequestHandler
- Returns:
true
if the request was consumed by the handler, no further action is then necessary. Iffalse
is returned, other handlers may handle the request afterwards.- Throws:
IOException
-
getReport
- Throws:
IOException
-
log
-