Package org.eblocker.server.common.data
Class ContentSecurityPolicy
java.lang.Object
org.eblocker.server.common.data.ContentSecurityPolicy
Parses the HTTP header Content-Security-Policy and inserts/edits the directives that allow the
ControlBar to work.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidallowControlBar(String controlBarUrl, String nonce) The following actions must be allowed for the ControlBar to work: Load icons from eBlocker Allow XMLHttpRequests to eBlocker Allow loading the ControlBar as an iframe Allow execution of the injected ControlBar JavaScriptstatic ContentSecurityPolicyParses Content-Security-Policy from a stringtoString()
-
Constructor Details
-
ContentSecurityPolicy
-
-
Method Details
-
toString
-
from
Parses Content-Security-Policy from a string- Parameters:
csp-- Returns:
-
allowControlBar
The following actions must be allowed for the ControlBar to work:- Load icons from eBlocker
- Allow XMLHttpRequests to eBlocker
- Allow loading the ControlBar as an iframe
- Allow execution of the injected ControlBar JavaScript
- Parameters:
controlBarUrl- the eBlocker URL from which to load icons, XMLHttpRequests and the ControlBar iframenonce- the nonce of the ControlBar JavaScript
-