Class SimpleContributor

java.lang.Object
jenkins.security.csp.SimpleContributor
All Implemented Interfaces:
ExtensionPoint, Contributor

@Restricted(org.kohsuke.accmod.restrictions.Beta.class) public abstract class SimpleContributor extends Object implements Contributor
Convenient base class for CSP contributors only adding individual domains to a fetch directive. Plugins may need to do this, likely for img-src, to allow loading avatars and similar resources.
Since:
TODO
  • Constructor Details

    • SimpleContributor

      public SimpleContributor()
  • Method Details

    • allow

      protected void allow(FetchDirective directive, String... domain)
    • apply

      public final void apply(CspBuilder cspBuilder)
      Description copied from interface: Contributor
      Contribute to the builder's rules by adding to or removing from the provided CspBuilder.
      Specified by:
      apply in interface Contributor
      Parameters:
      cspBuilder - the builder