Interface FetchMetadataRulesConfiguration


public interface FetchMetadataRulesConfiguration
Configuration for the built-in Fetch Metadata rules.
Since:
5.6.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Configuration prefix for the built-in Fetch Metadata rules.
    static final String
    Property that controls whether browser-initiated requests are allowed.
    static final String
    Property that controls whether permitted cross-origin requests are allowed.
    static final String
    Property that controls whether requests without the Sec-Fetch-Site header are allowed.
    static final String
    Property that controls whether same-origin requests are allowed.
    static final String
    Property that controls whether same-site requests are allowed.
    static final String
    Property that controls whether cross-site GET navigations, including cross-site iframing, are allowed.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Whether to allow requests initiated directly by a user through browser UI (Sec-Fetch-Site: none).
    boolean
    Whether to allow cross-origin requests to routes whose @CrossOrigin configuration accepts the request origin and HTTP method.
    boolean
    Whether to allow requests without the Sec-Fetch-Site header.
    boolean
    Whether to allow requests whose Fetch Metadata identifies their initiator as the same origin.
    boolean
    Whether to allow requests whose Fetch Metadata identifies their initiator as the same site.
    boolean
    Whether to allow cross-site GET navigations, including loading the application in a cross-site <iframe>.
  • Field Details

    • PREFIX

      static final String PREFIX
      Configuration prefix for the built-in Fetch Metadata rules.
      See Also:
    • PROPERTY_ALLOW_BROWSER_INITIATED_REQUESTS

      static final String PROPERTY_ALLOW_BROWSER_INITIATED_REQUESTS
      Property that controls whether browser-initiated requests are allowed.
      See Also:
    • PROPERTY_ALLOW_SAME_ORIGIN

      static final String PROPERTY_ALLOW_SAME_ORIGIN
      Property that controls whether same-origin requests are allowed.
      See Also:
    • PROPERTY_ALLOW_SAME_SITE

      static final String PROPERTY_ALLOW_SAME_SITE
      Property that controls whether same-site requests are allowed.
      See Also:
    • PROPERTY_ALLOW_NO_FETCH_METADATA

      static final String PROPERTY_ALLOW_NO_FETCH_METADATA
      Property that controls whether requests without the Sec-Fetch-Site header are allowed.
      See Also:
    • PROPERTY_ALLOW_SIMPLE_NAVIGATION

      static final String PROPERTY_ALLOW_SIMPLE_NAVIGATION
      Property that controls whether cross-site GET navigations, including cross-site iframing, are allowed.
      See Also:
    • PROPERTY_ALLOW_CROSS_ORIGIN

      static final String PROPERTY_ALLOW_CROSS_ORIGIN
      Property that controls whether permitted cross-origin requests are allowed.
      See Also:
  • Method Details

    • isAllowCrossOrigin

      boolean isAllowCrossOrigin()
      Whether to allow cross-origin requests to routes whose @CrossOrigin configuration accepts the request origin and HTTP method.
      Returns:
      whether the rule is enabled
    • isAllowBrowserInitiatedRequests

      boolean isAllowBrowserInitiatedRequests()
      Whether to allow requests initiated directly by a user through browser UI (Sec-Fetch-Site: none).
      Returns:
      whether the rule is enabled
    • isAllowSameOrigin

      boolean isAllowSameOrigin()
      Whether to allow requests whose Fetch Metadata identifies their initiator as the same origin.
      Returns:
      whether the rule is enabled
    • isAllowSameSite

      boolean isAllowSameSite()
      Whether to allow requests whose Fetch Metadata identifies their initiator as the same site.
      Returns:
      whether the rule is enabled
    • isAllowNoFetchMetadata

      boolean isAllowNoFetchMetadata()
      Whether to allow requests without the Sec-Fetch-Site header.
      Returns:
      whether the rule is enabled
    • isAllowSimpleNavigation

      boolean isAllowSimpleNavigation()
      Whether to allow cross-site GET navigations, including loading the application in a cross-site <iframe>. This rule does not protect against framing; use CSP frame-ancestors for that.
      Returns:
      whether the rule is enabled