Embedded Link only for my use and not others
Submitted by asfga on Thu, 01/06/2022 - 12:06
Forums:
Hello,
is it possible to use an embedded link of a H5P element only for myself to integrate it into another website and prevent others to embed this element on their website?
Thanks in advance!
otacke
Fri, 01/07/2022 - 00:01
Permalink
Hi asfga!If you have a server
Hi asfga!
If you have a server that you can configure yourself, then yes. You can set a so called "Content Security Policy" that allows you to define what other servers are allowed to embed content from yours (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors).
An older approach that was at the mercy of browsers supporting it is using X-Frame Options (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options) that also require server configuration.
Best,
Oliver
asfga
Mon, 01/10/2022 - 12:20
Permalink
Thank you very much, works
Thank you very much, works very well.
otacke
Mon, 01/10/2022 - 22:36
Permalink
Glad you figured it out! That
Glad you figured it out! That was certainly not easy, but you"re proof that solving those issues is possible without having step-by-step guides (which can hardly be given for all the possible scenarios) but with some useful links.
And thanks for saying thanks!
asfga
Fri, 01/14/2022 - 15:29
Permalink
Just one question: I checked
Just one question: I checked it from my laptop and it worked but when checking it on my mobile phone the embedded frame is blocked. Do you know why this is?
otacke
Fri, 01/14/2022 - 18:56
Permalink
Nope, can't tell without
Nope, can't tell without knowing details.
asfga
Tue, 01/25/2022 - 15:38
Permalink
I tried a few things out and
I tried a few things out and searched a lot on Google but wasn't successful with it. So I will post some details, maybe it helps someone to answer the question:
In general it works in Firefox + Chrome, but Safari (not only on mobile) seems to have problems with the embedding iFrame. I set the following line in my .htaccess
In the browser console I receive the following error:
The URL for the video is with the query parameter part, without it I can't call the video page and I think that is what's happening here. I need to add the video URL to the htaccess but it doesn't allow it, so how am I supposed to configure this? :/