> For the complete documentation index, see [llms.txt](https://helps.ptengine.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helps.ptengine.com/en/faq/others/csp-policy.md).

# What to Do When a CSP Error Occurs

If you encounter a Content Security Policy (CSP) error while installing the tag and [verifying tag firing](https://helps.ptengine.com/en/faq/start-guide/check-tag-firing), please follow the steps in this article to add Ptengine's domains to your whitelist.

Error screens

<figure><img src="https://1529003028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPPnIJR2ez3Te8TnXWxMb%2Fuploads%2Fgit-blob-fb72dbe4c45cd89e8edfda4a6b2f6d402ddee14c%2Ffaq-others-csp-policy-01.png?alt=media" alt="CSP error screen (Console)"><figcaption></figcaption></figure>

<figure><img src="https://1529003028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPPnIJR2ez3Te8TnXWxMb%2Fuploads%2Fgit-blob-f3d9dcbff42563694a2f78503f8392c49a06b6e0%2Ffaq-others-csp-policy-02.png?alt=media" alt="CSP error screen (Network tab)"><figcaption></figcaption></figure>

## When only `default-src` is configured <a href="#default-src" id="default-src"></a>

You need to add all three of the following: `unsafe-inline`, `*.ptengine.jp`, and `*.ptengine.com`.

```
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' *.ptengine.jp *.ptengine.com">
```

## When CSP is configured per media type <a href="#per-media" id="per-media"></a>

Please refer to the table below.

| Media       | Policy                                                |
| ----------- | ----------------------------------------------------- |
| script-src  | `'self' 'unsafe-inline' *.ptengine.jp *.ptengine.com` |
| style-src   | `'self' 'unsafe-inline' *.ptengine.jp *.ptengine.com` |
| connect-src | `*.ptengine.jp *.ptengine.com`                        |
| img-src     | `*.ptengine.jp *.ptengine.com`                        |
| frame-src   | `*.ptengine.jp *.ptengine.com`                        |

```
<meta http-equiv="Content-Security-Policy" content="default-src 'self' *.mydomain.com; script-src 'self' 'unsafe-inline' *.ptengine.jp *.ptengine.com; style-src 'self' 'unsafe-inline' *.ptengine.jp *.ptengine.com; connect-src 'self' wss://*.mydomain.com *.ptengine.jp *.ptengine.com; img-src 'self' *.ptengine.jp *.ptengine.com; font-src 'self' * data:; frame-src 'self' *.ptengine.jp; worker-src 'self' blob:">
```
