Class CSPResources
java.lang.Object
org.graylog2.shared.rest.resources.csp.CSPResources
A Content Security Policy header consists of a list of policy directives, each of
which consists of a directive and one or more values:
<CSP> ::= Content-Security-Policy: <csp-list>
<csp-list> :: = <policy-directive>{;<policy-directive>}
<policy-directive> ::= <directive> <value>{ <value>}
<directive> ::= default-src | script-src | ...
<value> ::= Strings that do not contain any white space
See https://content-security-policy.com/-
Constructor Summary
-
Method Summary
-
Constructor Details
-
CSPResources
public CSPResources() -
CSPResources
-
-
Method Details
-
cspString
Return csp-list as a single string, based on all the properties with the specified group name- Parameters:
group
-- Returns:
- CSP string
-
updateAll
Update all existing groups (rows) in the table with the specified value. Duplicated values are ignored; but substrings are tolerated e.g. test.com test.com:9999 Thread-safety needs to be enforced by the caller (i.e. CSPService).- Parameters:
directive
-value
- a directive value, consisting of one or more entries separated by blanks
-