Documentation
    Preparing search index...

    Function classifyTargetCors

    • Classify an access-control-allow-origin response value for an opaque origin.

      Parameters

      • targetUrl: string

        Target URL the header came from.

      • allowOrigin: string | null

        Raw access-control-allow-origin header value, or null when absent.

      Returns PajaTargetCorsDiagnostic

      Diagnostic describing whether the sandboxed frame can load assets.

      classifyTargetCors('http://127.0.0.1:5173/', '*').status; // 'allowed'
      classifyTargetCors('http://127.0.0.1:5173/', null).status; // 'blocked'