- This topic has 7 replies, 3 voices, and was last updated 4 years ago by
David.
-
AuthorPosts
-
May 6, 2022 at 12:04 am #2211085
Jason
Hi
I used lots of iFrame element to show the html5 file made by some authoring tool (Storyline3). These files should be only viewed by the registered participants.
But I noticed that these files’s URL can be viewed in the code sources of browsers and reused again outside of my website.for example
<iframe src=”https://www.w3schools.com/xx/xx/xx”></iframe>Do you have any ways to solve this problem?
Thanks very much.
Regards
JasonMay 6, 2022 at 12:16 am #2211097Fernando Customer Support
Hi Jason,
You’ll probably need custom Javascript to do as such.
See this for reference: https://www.quora.com/How-do-you-hide-an-iframe-URL-in-an-HTML-source-code
You can add JS through a Hook Element hooked to
wp_footer.Hope this clarifies. 🙂
May 6, 2022 at 2:31 am #2211232Jason
Hi Fernando,
Thanks for your help.I am still kind of confused on how to get it done
This is the steps I thought after review of your suggestion.
Step ONE: Create a Hook Element which I named it “ hide an iframe url“
What code should I put here?Step TWO: If I do not provide the URL in the iframe, how can I add URL in the Hook for each pages?
Step THREE: In the HTML block element, what should I put here?
I got two different answers as below3.1)
<html>
<body><iframe id=”iframe” src=””></iframe>
<script src=”main.js”></script>
</body>
</html>3.2)
<body>
<iframe src=”” />
</body>Thanks for your help.
Regards
JasonMay 6, 2022 at 3:09 am #2211269David
StaffCustomer SupportHi there,
are you hosting the iframes or are they provided by a 3rd party?
because unless you can edit the iframes code, so it includes Javascript to check for the top level domain, its virtually impossible to stop someone from grabbing the URL from that iframe and using it elsewhere.May 6, 2022 at 6:16 am #2211436Jason
Hi David
Thanks. I understood now.I got one advice to use a plugin called omniOrange prevent files/folders access, which keep the h5 files in their protected folders.
I am hosting the iFrame and edit the code as you mentioned.
Do you think that this could in the end solve this issue?
Thanks for your advice.
Regards
JasonMay 6, 2022 at 6:58 am #2211480David
StaffCustomer SupportPlugin sounds good 🙂 Alternatives … Have a look into X-Frame-Options:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
Or Frame Ancestors:
Or maybe a simple JS trick to check the top level domain in the iFrame.
May 6, 2022 at 9:00 am #2211753Jason
Thanks David
I will check againMay 6, 2022 at 9:15 am #2211771David
StaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.