# Resolve error "because it violates the following Content Security Policy directive: "connect-src 'self'"

**URL:** <https://forum.collaboraonline.com/t/resolve-error-because-it-violates-the-following-content-security-policy-directive-connect-src-self/2279>\
**Category:** Uncategorized\
**Created:** [December 28, 2023, 3:44am UTC](https://forum.collaboraonline.com/t/resolve-error-because-it-violates-the-following-content-security-policy-directive-connect-src-self/2279 "2023-12-28T03:44:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![shakti](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@shakti](https://forum.collaboraonline.com/u/shakti)\
**Post date:** [December 28, 2023, 3:44am UTC](https://forum.collaboraonline.com/t/resolve-error-because-it-violates-the-following-content-security-policy-directive-connect-src-self/2279/1 "2023-12-28T03:44:15Z")

</div>

I have collabora community edition.  
i am calling another domain webservice from cool.html javascript. collabora gives error "because it violates the following Content Security Policy directive: “connect-src ‘self’”. there is one settings in coolwsd.xml “content\_security\_policy”.  
need urgent help to resolve this issue.

---

<div class="post-metadata">

**Author:** ![mmeeks](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/mmeeks/32/371_2.png) [@mmeeks](https://forum.collaboraonline.com/u/mmeeks)\
**Post date:** [December 28, 2023, 1:49pm UTC](https://forum.collaboraonline.com/t/resolve-error-because-it-violates-the-following-content-security-policy-directive-connect-src-self/2279/2 "2023-12-28T13:49:00Z")

</div>

Can you give some idea of the context you’re working in and details on the urgency constraint here? Its a little hard to understand your problem without more details and work. Please don’t add this request to several forum posts to try to speed things up.

---

<div class="post-metadata">

**Author:** ![shakti](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@shakti](https://forum.collaboraonline.com/u/shakti)\
**Post date:** [December 30, 2023, 9:07pm UTC](https://forum.collaboraonline.com/t/resolve-error-because-it-violates-the-following-content-security-policy-directive-connect-src-self/2279/3 "2023-12-30T21:07:51Z")

</div>

in cool.html i am trying to call webservice outside of the collabora server. its an ajax call call to outside domain. from collabora viewer we get the error “Refused to connect to ‘[https://outsidecollaboradomain/web/service/path](https://outsidecollaboradomain/web/service/path)’ because it violates the following Content Security Policy directive: “connect-src ‘self’ [https://www.zotero.org](https://www.zotero.org) [https://api.zotero.org](https://api.zotero.org) wss://collaboradomain.com [https://collaboradomain.com](https://collaboradomain.com)”.”. I have tried to change the content\_security\_policy in coolwsd.xml. and i am suing nginx server. in nginx server also i added header but the same result. need urgent help to resolve this issue.

---

<div class="post-metadata">

**Author:** ![mmeeks](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/mmeeks/32/371_2.png) [@mmeeks](https://forum.collaboraonline.com/u/mmeeks)\
**Post date:** [January 1, 2024, 10:40am UTC](https://forum.collaboraonline.com/t/resolve-error-because-it-violates-the-following-content-security-policy-directive-connect-src-self/2279/4 "2024-01-01T10:40:10Z")

</div>

> [@mmeeks](#):
>
> details on the urgency constraint here?

> [@mmeeks](#):
>
> need urgent help to resolve this issue.

It’s currently Christmas & the New Year, break; nevertheless Collabora keeps a live support team working across the break to solve urgent problems for partners and paying customers. If you need this level of support you should seriously consider either [becoming a partner](https://www.collaboraoffice.com/become-partner/) or getting a [support contract](https://www.collaboraoffice.com/subscriptions/), and then filing tickets in our [support portal](https://www.collaboraoffice.com/partner-client-portal/). If you can provide more details on your use-case / commercial requirements of course - what integration, deployment etc. perhaps we can help you but - I would really suggest supporting the project by contributing to development via paid support.

---

<div class="post-metadata">

**Author:** ![shakti](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@shakti](https://forum.collaboraonline.com/u/shakti)\
**Post date:** [January 1, 2024, 10:01pm UTC](https://forum.collaboraonline.com/t/resolve-error-because-it-violates-the-following-content-security-policy-directive-connect-src-self/2279/5 "2024-01-01T22:01:01Z")

</div>

the use case is we need to register when the actual viewer opened successfully. We are very small group of 20 people. and we need to explore all options from collabora before we implement in our inner group environment. That’s why the urgency is there. if you can help it will be great help.

---

<div class="post-metadata">

**Author:** ![shakti](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@shakti](https://forum.collaboraonline.com/u/shakti)\
**Post date:** [January 3, 2024, 12:37pm UTC](https://forum.collaboraonline.com/t/resolve-error-because-it-violates-the-following-content-security-policy-directive-connect-src-self/2279/6 "2024-01-03T12:37:19Z")

</div>

Thanks a lot. i have figured how to overcome the issue. it can be done by CSP setting in collabora.

---

<div class="post-metadata">

**Author:** ![Tex](https://avatars.discourse-cdn.com/v4/letter/t/eb8c5e/32.png) [@Tex](https://forum.collaboraonline.com/u/Tex)\
**Post date:** [January 4, 2024, 2:51pm UTC](https://forum.collaboraonline.com/t/resolve-error-because-it-violates-the-following-content-security-policy-directive-connect-src-self/2279/7 "2024-01-04T14:51:36Z")

</div>

> [@shakti](#):
>
> Thanks a lot. i have figured how to overcome the issue. it can be done by CSP setting in collabora.

Hey @shakti, Great to hear you fixed it. 🙂

Can you please explain what setting you changed? And/or where you found the info/solution?

That would help anyone else who ran across a similar problem in the future!

> [@shakti](#):
>
> We are very small group of 20 people. […] need urgent help to resolve this issue.

You may also want to visit the:

- [Collabora Office: “Subscriptions” page](https://www.collaboraoffice.com/subscriptions/)

and “Request a Quote”.

Like @mmeeks said, if you:

- Needed more dedicated/faster support
- Have many (20+) users

then it’s offered for a reasonable fee per user / per year.

These forums are more for helping solve questions/problems at their own pace… and many people answering could just be normal Collabora users / volunteers. 🙂
