java.lang.Object
org.htmlunit.csp.Directive
org.htmlunit.csp.directive.HostSourceDirective
org.htmlunit.csp.directive.FrameAncestorsDirective
Represents the
frame-ancestors CSP directive.
The frame-ancestors directive restricts which URLs can embed the
protected resource using <frame>, <iframe>, <object>,
<embed>, or <applet>. Unlike other directives, it uses an
ancestor-source list (host-sources and scheme-sources only — no nonces or hashes)
and only matches against origins (paths are always ignored).
- Author:
- Salvation Team
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.htmlunit.csp.Directive
Directive.DirectiveErrorConsumer -
Field Summary
Fields inherited from class org.htmlunit.csp.Directive
IS_DIRECTIVE_NAME -
Constructor Summary
ConstructorsConstructorDescriptionFrameAncestorsDirective(List<String> values, Directive.DirectiveErrorConsumer errors) Parses aframe-ancestorsdirective from the given list of values. -
Method Summary
Methods inherited from class org.htmlunit.csp.directive.HostSourceDirective
addValue, getHosts, getNone, getSchemes, removeValueIgnoreCase, self, starMethods inherited from class org.htmlunit.csp.Directive
containsNonDirectiveCharacter, getValues
-
Constructor Details
-
FrameAncestorsDirective
Parses aframe-ancestorsdirective from the given list of values.Each token is classified as
'none','self',*, a scheme-source, or a host-source. Errors and warnings (duplicates, unrecognised tokens, combining'none'with other values, empty lists) are reported through the suppliederrorsconsumer.- Parameters:
values- the raw string values for this directiveerrors- consumer that receives parsing errors and warnings
-