Documentation
    Preparing search index...

    Function buildNappletCsp

    • Build the default NIP-5D CSP with validated host source-list replacements. Meta-unsupported directives must be configured on the host HTTP response.

      Parameters

      • options: NappletCspOptions = {}

        Explicit connection grants and directive replacements.

      • lockTrustedTypes: boolean = false

      Returns string

      A serialized policy. Invalid or conflicting overrides throw.

      const policy = buildNappletCsp({
      connectOrigins: ['https://api.example'],
      directives: { 'media-src': ['blob:'] },
      });