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

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=

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’ 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.

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.