Skip to content

Use a strict CSP ​

The script operates with a strict Content Security Policy. It does not use eval or inline styles, and it is compatible with Trusted Types. Use this page to allow the script in your policy.

Procedure ​

  1. Add the CDN to script-src:

    text
    script-src 'self' https://cdn.jsdelivr.net;
  2. Add the endpoint to connect-src. When you use a first party endpoint, add your endpoint in its place:

    text
    connect-src 'self' https://in.quickpipe.ai;
  3. Use the script tag with a fixed version and the integrity attribute, as QuickPipe gives it:

    html
    <script async src="https://cdn.jsdelivr.net/npm/@quickpipeaiab/[email protected]/dist/lg.js"
            integrity="sha384-…" crossorigin="anonymous"
            data-key="lg-pub-live-…"></script>

Result ​

The browser runs the script only when the file has the correct hash. The adapters come from the same CDN, and the core checks their hashes.

The stub ​

The stub window.lg=window.lg||function(){…} is an inline script. With a strict policy, put the stub in a file on your domain, or add its hash to script-src.

The hashes ​

The hash of each browser file is in integrity.json, in the npm package and in the GitHub release of each version. Use a URL with a fixed version. A URL without a fixed version cannot have an integrity attribute.