Class FrameAncestorsDirective


public class FrameAncestorsDirective extends HostSourceDirective
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:
  • Constructor Details

    • FrameAncestorsDirective

      public FrameAncestorsDirective(List<String> values, Directive.DirectiveErrorConsumer errors)
      Parses a frame-ancestors directive 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 supplied errors consumer.

      Parameters:
      values - the raw string values for this directive
      errors - consumer that receives parsing errors and warnings