Package org.htmlunit.csp
Class Policy
java.lang.Object
org.htmlunit.csp.Policy
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic enum -
Method Summary
Modifier and TypeMethodDescriptionbooleanallowsApplicationManifest(Optional<URLWithScheme> source, Optional<URLWithScheme> origin) booleanallowsConnection(Optional<URLWithScheme> source, Optional<URLWithScheme> origin) booleanbooleanallowsExternalScript(Optional<String> nonce, Optional<String> integrity, Optional<URLWithScheme> scriptUrl, Optional<Boolean> parserInserted, Optional<URLWithScheme> origin) booleanallowsExternalStyle(Optional<String> nonce, Optional<URLWithScheme> styleUrl, Optional<URLWithScheme> origin) booleanallowsFont(Optional<URLWithScheme> source, Optional<URLWithScheme> origin) booleanallowsFormAction(Optional<URLWithScheme> to, Optional<Boolean> redirected, Optional<URLWithScheme> redirectedTo, Optional<URLWithScheme> origin) booleanallowsFrame(Optional<URLWithScheme> source, Optional<URLWithScheme> origin) booleanallowsFrameAncestor(Optional<URLWithScheme> source, Optional<URLWithScheme> origin) booleanallowsImage(Optional<URLWithScheme> source, Optional<URLWithScheme> origin) booleanallowsInlineScript(Optional<String> nonce, Optional<String> source, Optional<Boolean> parserInserted) booleanallowsInlineStyle(Optional<String> nonce, Optional<String> source) booleanallowsJavascriptUrlNavigation(Optional<String> source, Optional<URLWithScheme> origin) booleanallowsMedia(Optional<URLWithScheme> source, Optional<URLWithScheme> origin) booleanallowsNavigation(Optional<URLWithScheme> to, Optional<Boolean> redirected, Optional<URLWithScheme> redirectedTo, Optional<URLWithScheme> origin) booleanallowsObject(Optional<URLWithScheme> source, Optional<URLWithScheme> origin) booleanallowsPlugin(Optional<MediaType> mediaType) booleanallowsPrefetch(Optional<URLWithScheme> source, Optional<URLWithScheme> origin) booleanallowsScriptAsAttribute(Optional<String> source) booleanallowsStyleAsAttribute(Optional<String> source) booleanallowsWorker(Optional<URLWithScheme> source, Optional<URLWithScheme> origin) baseUri()booleanstatic booleandoesUrlMatchSourceListInOrigin(URLWithScheme url, HostSourceDirective list, Optional<URLWithScheme> origin) static PolicyparseSerializedCSP(String serialized, Policy.PolicyErrorConsumer policyErrorConsumer) static PolicyListparseSerializedCSPList(String serialized, Policy.PolicyListErrorConsumer policyListErrorConsumer) reportTo()sandbox()toString()boolean
-
Method Details
-
parseSerializedCSPList
public static PolicyList parseSerializedCSPList(String serialized, Policy.PolicyListErrorConsumer policyListErrorConsumer) -
parseSerializedCSP
public static Policy parseSerializedCSP(String serialized, Policy.PolicyErrorConsumer policyErrorConsumer) -
toString
-
baseUri
-
blockAllMixedContent
public boolean blockAllMixedContent() -
formAction
-
frameAncestors
-
pluginTypes
-
prefetchSrc
-
reportTo
-
reportUri
-
sandbox
-
upgradeInsecureRequests
public boolean upgradeInsecureRequests() -
getFetchDirective
-
allowsExternalScript
public boolean allowsExternalScript(Optional<String> nonce, Optional<String> integrity, Optional<URLWithScheme> scriptUrl, Optional<Boolean> parserInserted, Optional<URLWithScheme> origin) -
allowsInlineScript
-
allowsScriptAsAttribute
-
allowsEval
public boolean allowsEval() -
allowsFormAction
public boolean allowsFormAction(Optional<URLWithScheme> to, Optional<Boolean> redirected, Optional<URLWithScheme> redirectedTo, Optional<URLWithScheme> origin) -
allowsExternalStyle
public boolean allowsExternalStyle(Optional<String> nonce, Optional<URLWithScheme> styleUrl, Optional<URLWithScheme> origin) -
allowsInlineStyle
-
allowsStyleAsAttribute
-
allowsFrame
-
allowsFrameAncestor
-
allowsConnection
-
allowsFont
-
allowsImage
-
allowsApplicationManifest
public boolean allowsApplicationManifest(Optional<URLWithScheme> source, Optional<URLWithScheme> origin) -
allowsMedia
-
allowsObject
-
allowsPrefetch
-
allowsWorker
-
allowsPlugin
-
getGoverningDirectiveForEffectiveDirective
public Optional<SourceExpressionDirective> getGoverningDirectiveForEffectiveDirective(FetchDirectiveKind kind) -
doesUrlMatchSourceListInOrigin
public static boolean doesUrlMatchSourceListInOrigin(URLWithScheme url, HostSourceDirective list, Optional<URLWithScheme> origin)
-