Iframe not showing
-
Hi,
I tried to write my first plugin starting from scratch and imitating (almost copying) the https://github.com/a5mith/nodebb-plugin-youtube-lite plugin. I changed it so it can embed steam game information on a post based on the url of the game with the following syntax :
<iframe src="http://store.steampowered.com/widget/242680/" frameborder="0" width="646" height="190"></iframe>
the number being relative to a given game.
The substitution takes place on the post, but nothing shows up. Here is the test plugin :
https://github.com/Hukadan/nodebb-plugin-steam-jaquetteAnd here is the post where it does not show up (sorry for the strange port number, but the normal one is used by the production forum) :
https://forum.zqsd.fr:6666/topic/333/test-pluginSearching on this forum for a similar issue, this topic showed up but did not helped me much :
https://community.nodebb.org/topic/6036/iframe-not-loading-help/2Thank you.
-
I suppose it's a mixed-content block of your browser.
If you embed an iframe with
http
source within ahttps
page it gets blocked by modern browsers.
Since steam supportshttps
as well, you can easily change thisBest practice might be to just skip that part and use
src="//store.steampowered.com/widget/242680/"
. This way it gets loaded with the same protocol your site does. -
Thank you. I did not know it would block it. I was expecting a warning beside the locker on the address bar. Thank you, this solved the problem.