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

**URL:** <https://forum.collaboraonline.com/t/refused-to-connect-because-it-violates-the-following-content-security-policy-directive-connect-src-self/175>\
**Category:** Installation & Configuration\
**Created:** [January 31, 2021, 8:01pm UTC](https://forum.collaboraonline.com/t/refused-to-connect-because-it-violates-the-following-content-security-policy-directive-connect-src-self/175 "2021-01-31T20:01:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cyberneticos](https://avatars.discourse-cdn.com/v4/letter/c/96bed5/32.png) [@Cyberneticos](https://forum.collaboraonline.com/u/Cyberneticos)\
**Post date:** [January 31, 2021, 8:01pm UTC](https://forum.collaboraonline.com/t/refused-to-connect-because-it-violates-the-following-content-security-policy-directive-connect-src-self/175/1 "2021-01-31T20:01:16Z")

</div>

Hi,

I installed Collabora Online within Nextcloud using Collabora Online - Built-in CODE Server. The URL used to set up the server is something like this (I used an IP instead of a hostname):

[https://XXX.XXX.XXX.XXX/apps/richdocumentscode/proxy.php?req=](https://XXX.XXX.XXX.XXX/apps/richdocumentscode/proxy.php?req=)

But when I access through the hostname instead of the IP I see a grey page and cannot edit my documents.

I see in the Google Console this error:

**Refused to connect to ‘[https://XXX.XXX.XXX.XXX/apps/richdocumentscode/proxy.php?status](https://XXX.XXX.XXX.XXX/apps/richdocumentscode/proxy.php?status)’ because it violates the following Content Security Policy directive: "connect-src ‘self’"**

Is there a way to access using both the IP and hostname? Where can I change that directive?

Thanks.

---

<div class="post-metadata">

**Author:** ![kara](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@kara](https://forum.collaboraonline.com/u/kara)\
**Post date:** [February 14, 2021, 5:49pm UTC](https://forum.collaboraonline.com/t/refused-to-connect-because-it-violates-the-following-content-security-policy-directive-connect-src-self/175/2 "2021-02-14T17:49:09Z")

</div>

AFAIK, Built-in CODE server focuses on ease of setup/installation, so is not configurable in that regard. In case of changes in the domain, it tries to adapt automatically, but simultaneously using a mix of different domains or IP addresses is prone to errors

I suggest sticking with one domain or IP address while accessing your installation, or try installing CODE from packages or docker image.
