nextcloud-sharing-path icon indicating copy to clipboard operation
nextcloud-sharing-path copied to clipboard

Embedding not allowed

Open flossgeek opened this issue 2 years ago • 3 comments

Hello, thanks for the great work! This app is exactly what I need (at least, if it works). I have followed all your instructions, but nextcloud still seems to prevent embedding the files in external sites. In a normal browser tab it works perfectly, so that shouldn't be the problem I suppose. I added the domain in which I want to embed a file to the CSP policy as Frame Ancestor with the following app: https://apps.nextcloud.com/apps/csp_editor.

I would expect everything should work now, but unfortunately it doesn't. Any idea what could be going wrong?

flossgeek avatar Apr 02 '22 18:04 flossgeek

I also got similar problem. The link could be visit via url in chrome, but it could not work in the iframe.

huangwb8 avatar Apr 29 '22 01:04 huangwb8

X-Frame-Options is a HTTP header, not a CSP policy. It's an old way to do exactly the same than the frame-ancestors, restricting which websites can embed a page.

Nextcloud sets it by default to SAMEORIGIN, meaning that only the same domain or subdomains from the website can embed it.

This app needs to set the header value to ALLOW when producing the response.

tcitworld avatar Jun 07 '22 07:06 tcitworld

Alright, thanks. So it's up to @rookie0 to solve it? :) I'm wondering though how seemingly many people are able to use this app without problems.

flossgeek avatar Jun 07 '22 08:06 flossgeek