# What is an appropiate Content-Security-Policy (CSP) for embedding an application on the Zoom Client

**URL:** <https://devforum.zoom.us/t/what-is-an-appropiate-content-security-policy-csp-for-embedding-an-application-on-the-zoom-client/73158>\
**Category:** Zoom Apps\
**Created:** [July 28, 2022, 1:54pm UTC](https://devforum.zoom.us/t/what-is-an-appropiate-content-security-policy-csp-for-embedding-an-application-on-the-zoom-client/73158 "2022-07-28T13:54:34Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![development4](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@development4](https://devforum.zoom.us/u/development4)\
**Post date:** [July 28, 2022, 1:54pm UTC](https://devforum.zoom.us/t/what-is-an-appropiate-content-security-policy-csp-for-embedding-an-application-on-the-zoom-client/73158/1 "2022-07-28T13:54:34Z")

</div>

We are developing the integration for the [ClixieMedia](https://clixiemedia.com). We are able to show the Clixie application within the Zoom client, but some of the styles are not applied correctly.

The CSP header that is currently configured is:

default-src ‘self’ http: https: ws: wss: data: blob: ‘unsafe-inline’ ‘unsafe-eval’; frame-ancestors ‘self’

The result, using this header, is that the page does not look good, because of some unapplied styles.

- what is a better header so the page displays correctly on the Zoom client?
- how to debug the page in the Zoom Client? The zoom client is running on a Mac (v 10.15.7), and it’s my understanding that it’s using WebKit.

Thanks.!!

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [August 3, 2022, 8:21pm UTC](https://devforum.zoom.us/t/what-is-an-appropiate-content-security-policy-csp-for-embedding-an-application-on-the-zoom-client/73158/2 "2022-08-03T20:21:10Z")

</div>

@development4 How are you importing the styles that are blocked? Do you see any errors in the JS console? For the most part, you should see that you can use styles from the same origin but you need to include any external styles in the style-src directive.

We have an example of the CSP headers here:

> <https://github.com/zoom/zoomapps-sample-js/blob/a36bd07c3ad433d89c1241118c45e9dd0d854235/app.js#L70>

---

<div class="post-metadata">

**Author:** ![development4](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@development4](https://devforum.zoom.us/u/development4)\
**Post date:** [August 16, 2022, 11:07pm UTC](https://devforum.zoom.us/t/what-is-an-appropiate-content-security-policy-csp-for-embedding-an-application-on-the-zoom-client/73158/3 "2022-08-16T23:07:21Z")

</div>

Hi

the page being rendered does include some external CSS and JS files. But I have included them into the CSP header.

One issue I have is not having the ability to review what policy failed. In the browser, I usually do this using the console from the developer tools, but in the Zoom Client I do not have access to this.

Is there any other way to review the console, or at least the policy violations, in the zoom client?

Thanks…!

---

<div class="post-metadata">

**Author:** ![development4](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@development4](https://devforum.zoom.us/u/development4)\
**Post date:** [August 18, 2022, 3:34pm UTC](https://devforum.zoom.us/t/what-is-an-appropiate-content-security-policy-csp-for-embedding-an-application-on-the-zoom-client/73158/4 "2022-08-18T15:34:06Z")

</div>

Hi.

the styles are still not being applied in the clixie app integration. But I was able to activate the CSP reporting capabilities, and now I receive the CSP violations to review them.

In this gist [https://gist.github.com/alfredox/09eb87663dcc0a89cf972e823f60e8b4](https://gist.github.com/alfredox/09eb87663dcc0a89cf972e823f60e8b4) I document the violations. I have to include them as an external gist, because I could not include them as text, nor as an image.

Do you have any idea why this is happening? Or any suggestion that would help in the resolution of this issue?

The Zoom Client version is: Version: 5.11.6 (9890) in Mac OS X 10.15.7.

Thanks…!

---

<div class="post-metadata">

**Author:** ![RostislavR](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rostislavr/32/39790_2.png) [@RostislavR](https://devforum.zoom.us/u/RostislavR)\
**Post date:** [August 22, 2022, 9:07pm UTC](https://devforum.zoom.us/t/what-is-an-appropiate-content-security-policy-csp-for-embedding-an-application-on-the-zoom-client/73158/5 "2022-08-22T21:07:06Z")

</div>

@development4 you do have access to the console actually.

[Instructions for enabling them here.](https://marketplace.zoom.us/docs/zoom-apps/referenceapp/#enabling--developer-tools)

---

<div class="post-metadata">

**Author:** ![development4](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@development4](https://devforum.zoom.us/u/development4)\
**Post date:** [August 29, 2022, 1:49pm UTC](https://devforum.zoom.us/t/what-is-an-appropiate-content-security-policy-csp-for-embedding-an-application-on-the-zoom-client/73158/6 "2022-08-29T13:49:27Z")

</div>

Thanks. I was able to activate the console.

The issue is that it’s still not working, I am not able to load external JS/CSS/Fonts in the page.

I created a video to show you this.

[https://clixie.s3.amazonaws.com/screen+recording+csp+zoom+client.mp4](https://clixie.s3.amazonaws.com/screen+recording+csp+zoom+client.mp4)

Thanks…!

---

<div class="post-metadata">

**Author:** ![RostislavR](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rostislavr/32/39790_2.png) [@RostislavR](https://devforum.zoom.us/u/RostislavR)\
**Post date:** [August 29, 2022, 3:14pm UTC](https://devforum.zoom.us/t/what-is-an-appropiate-content-security-policy-csp-for-embedding-an-application-on-the-zoom-client/73158/7 "2022-08-29T15:14:12Z")

</div>

Hey @development4 yeah, this is known thing that i messaged about earlier.

> [@Can't load a script from a cdn?](https://devforum.zoom.us/t/cant-load-a-script-from-a-cdn/73244):
>
> I am trying to load lodash via a cdn and am getting the following error. Does this mean that we can’t use any cdns at all? Domain violates Zoom App Marketplace domain policy. Reason: Domain permits serving user-generated content. [https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.min.js](https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.min.js)

I’ve gone around it by not loading anything from a cdn for now and just bundling my code with esbuild.

---

<div class="post-metadata">

**Author:** ![development4](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@development4](https://devforum.zoom.us/u/development4)\
**Post date:** [August 30, 2022, 1:12pm UTC](https://devforum.zoom.us/t/what-is-an-appropiate-content-security-policy-csp-for-embedding-an-application-on-the-zoom-client/73158/8 "2022-08-30T13:12:08Z")

</div>

No problem for that JS library. I included it as an example but has been removed.

The issue we have is that, even though we do bundle most of the libraries (JS/CSS) in the page, there are some that we cannot bundle.

For instance, Google Fonts should be served from Google. We apply the CSP directives exemplified here [Example Using Google Fonts with a Content-Security-Policy](https://content-security-policy.com/examples/google-fonts/), but still does not work.

Also, our video player library that is stored in AWS S3/Cloudfront, in the server [d2ywhs8rofwyum.cloudfront.net](http://d2ywhs8rofwyum.cloudfront.net), we cannot load it by applying the CSP directive.

What can we do with these cases that cannot be bundled?

Thanks for your prompt responses…!

---

<div class="post-metadata">

**Author:** ![RostislavR](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rostislavr/32/39790_2.png) [@RostislavR](https://devforum.zoom.us/u/RostislavR)\
**Post date:** [August 31, 2022, 9:59pm UTC](https://devforum.zoom.us/t/what-is-an-appropiate-content-security-policy-csp-for-embedding-an-application-on-the-zoom-client/73158/9 "2022-08-31T21:59:08Z")

</div>

Not sure about the video, but I am able to get google fonts loading.

```auto
 {
    "Referrer-Policy": "same-origin",
    "Content-Security-Policy": (
         "default-src 'self';"
         "style-src 'self' 'unsafe-inline' fonts.googleapis.com; "
         "script-src 'self' 'unsafe-inline';"
         "font-src fonts.gstatic.com;"
     ),
     "X-Content-Type-Options": "nosniff",
     "Strict-Transport-Security": "max-age=31536000",
}

```

you have to mirror the things you put in your csp on [marketplace.zoom.com](http://marketplace.zoom.com) in your app configuration as well just fyi.

---

<div class="post-metadata">

**Author:** ![development4](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@development4](https://devforum.zoom.us/u/development4)\
**Post date:** [September 5, 2022, 2:36pm UTC](https://devforum.zoom.us/t/what-is-an-appropiate-content-security-policy-csp-for-embedding-an-application-on-the-zoom-client/73158/10 "2022-09-05T14:36:16Z")

</div>

Added the configuration for the font. It’s working now.

The issue we have is with the additional domains: for instance, we use [d2ywhs8rofwyum.cloudfront.net](http://d2ywhs8rofwyum.cloudfront.net) (from AWS) to serve some of our static JS libraries. But when added to the app configuration (on the app marketplace), it appears the following message:

```auto
Domain violates Zoom App Marketplace domain policy. Reason: Domain permits serving user-generated content.

```

What do you suggest we do about those libraries loaded from that domain?  
Is it possible to have exceptions to the domain rules for UGC?

Thanks!

---

<div class="post-metadata">

**Author:** ![RostislavR](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rostislavr/32/39790_2.png) [@RostislavR](https://devforum.zoom.us/u/RostislavR)\
**Post date:** [September 6, 2022, 3:40am UTC](https://devforum.zoom.us/t/what-is-an-appropiate-content-security-policy-csp-for-embedding-an-application-on-the-zoom-client/73158/11 "2022-09-06T03:40:58Z")

</div>

@development4 this is what I linked to before about cdn’s not being allowed. The zoom team said they were looking into that, so maybe something will change. In the meantime, I’m just bundling all of my dependencies manually using a build tool instead of serving things through a cdn.

---

<div class="post-metadata">

**Author:** ![development4](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@development4](https://devforum.zoom.us/u/development4)\
**Post date:** [September 9, 2022, 2:06pm UTC](https://devforum.zoom.us/t/what-is-an-appropiate-content-security-policy-csp-for-embedding-an-application-on-the-zoom-client/73158/12 "2022-09-09T14:06:38Z")

</div>

Thanks for the responses. I already moved out the scripts from that CDN, so the JS is being loaded.

I still have some issues, though.

For development, I added the url [clixiedev-alf-resp.ngrok.io](http://clixiedev-alf-resp.ngrok.io) in the marketplace configuration page, but it says:

```auto
Domain violates Zoom App Marketplace domain policy. Reason: Developer tools should be removed before publishing the app.

```

I get that those domain should not be configured when launching the app in production. But for development? What can I do to include ngrok sites i use for dev?

Regards!!

---

<div class="post-metadata">

**Author:** ![RostislavR](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rostislavr/32/39790_2.png) [@RostislavR](https://devforum.zoom.us/u/RostislavR)\
**Post date:** [September 9, 2022, 2:20pm UTC](https://devforum.zoom.us/t/what-is-an-appropiate-content-security-policy-csp-for-embedding-an-application-on-the-zoom-client/73158/13 "2022-09-09T14:20:46Z")

</div>

I’m getting that error too but I can’t tell if it’s actually interfering with the app running in development. Have you confirmed that its actually an issue?

---

<div class="post-metadata">

**Author:** ![development4](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@development4](https://devforum.zoom.us/u/development4)\
**Post date:** [September 22, 2022, 3:56pm UTC](https://devforum.zoom.us/t/what-is-an-appropiate-content-security-policy-csp-for-embedding-an-application-on-the-zoom-client/73158/14 "2022-09-22T15:56:25Z")

</div>

The issue was solved by not using an ngrok domain. We are still using ngrok, but with a custom domain name (no [ngrok.io](http://ngrok.io) in the url).

We have another issue.

We are executing a JS, trying to open the domain configured in the Marketplace.

```auto
window.open(validUrl);

```

But it does nothing, and does not throws any message.

What this should is open another tab/window with a Clixie player.

Thanks.!
