java.lang.Object
org.htmlunit.csp.CspQueriesInOrigin
org.htmlunit.csp.PolicyInOrigin
A convenience wrapper that pairs a
Policy with its
origin, providing simplified query methods that
automatically supply the origin to the underlying policy checks.
Each allows* method is defined on CspQueriesInOrigin and
delegates to Policy (CspQueries), filling in
Optional.of(origin) for the origin parameter and
Optional.empty() for unused parameters (nonce, integrity, redirects).
- Author:
- Ronald Brill, Rick Mitchell, Salvation Team
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.htmlunit.csp.CspQueriesInOrigin
allowsConnection, allowsEval, allowsFontFromSource, allowsFormAction, allowsFrameAncestor, allowsFrameFromSource, allowsImageFromSource, allowsManifestFromSource, allowsMediaFromSource, allowsNavigation, allowsObjectFromSource, allowsPrefetchFromSource, allowsScriptFromSource, allowsStyleFromSource, allowsUnsafeInlineScript, allowsUnsafeInlineStyle, allowsWorkerFromSource, getOrigin, getQueries
-
Constructor Details
-
PolicyInOrigin
Ctor.- Parameters:
policy- the Content Security Policy to query againstorigin- the origin of the protected resource
-
-
Method Details
-
getPolicy
Returns the underlyingPolicy.- Returns:
- the policy associated with this origin-bound wrapper
-