ocis icon indicating copy to clipboard operation
ocis copied to clipboard

[Bug] wopi in web development setup is broken because of CSP

Open ScharfViktor opened this issue 9 months ago • 5 comments

ScharfViktor avatar May 06 '24 14:05 ScharfViktor

I assume https://github.com/owncloud/ocis/pull/8777 (see also https://github.com/owncloud/ocis/pull/9007) broke it. When using Web on port 9200 directly, icons for opening files with wopi apps are not shown and neither onlyoffice nor collabora load because of CSP. Can you please help us fix the setup, @DeepDiver1975?

dschmidt avatar May 06 '24 14:05 dschmidt

Let me have a look into my crystal call .....

DeepDiver1975 avatar May 06 '24 14:05 DeepDiver1975

We're in oCIS Zoom - feel free to join and we'll show you.

Otherwise: it's just docker-compose up -d in the web repo and then browsing to https://host.docker.internal:9200 and trying to use wopi

dschmidt avatar May 06 '24 14:05 dschmidt

We're in oCIS Zoom - feel free to join and we'll show you.

Not today .... meetings .... :shrug:

DeepDiver1975 avatar May 06 '24 14:05 DeepDiver1975

Feel free to look into https://github.com/owncloud/ocis/blob/045d5450f0f940e838762112a0331ec2f4c996af/deployments/examples/ocis_wopi/docker-compose.yml#L96 https://github.com/owncloud/ocis/blob/045d5450f0f940e838762112a0331ec2f4c996af/deployments/examples/ocis_wopi/config/ocis/csp.yaml#L16 https://github.com/owncloud/ocis/blob/045d5450f0f940e838762112a0331ec2f4c996af/deployments/examples/ocis_wopi/docker-compose.yml#L91-L93

Basically you need to give ocis a csp.yaml config file which specifies the collabory/onlyoffice domains.

Let me know if you need more details.

DeepDiver1975 avatar May 06 '24 14:05 DeepDiver1975

fix here https://github.com/owncloud/web/pull/10885

ScharfViktor avatar May 07 '24 12:05 ScharfViktor