Function generateContentSecurityPolicyHeader

  • Helper function that generates a string containing a Content Security Policy that can be used in a security header.

    NOTE: The string can be further extended using string concatenation for directives that aren't currently supported by the function.

    Parameters

    • OptionalheaderOptions: ContentSecurityPolicyHeader

    Returns string