Interface ContentSecurityPolicyConfig

  • All Known Implementing Classes:
    HttpSecurityHeadersFilter

    public interface ContentSecurityPolicyConfig
    Allows manipulating directives for ContentSecurityPolicy header in TeamCity See https://content-security-policy.com/ for some help
    Since:
    2019.1
    Author:
    kir
    • Field Detail

      • DIRECTIVE_NAMES

        static final Set<String> DIRECTIVE_NAMES
    • Method Detail

      • addUnprotectedPath

        void addUnprotectedPath​(String path)
        Parameters:
        path - start of the path which will be allowed to loaded in external iframes, allows embedding TeamCity pages into other sites.
      • addDirectiveItems

        void addDirectiveItems​(String directiveName,
                               String... values)
        Parameters:
        directiveName - related CSP directive, must be one of DIRECTIVE_NAMES
        values - include quotes when needed, like "'self'"
        Throws:
        IllegalArgumentException - when directiveName is not valid