iFrame card link cannot be localhost or hosts entry

Hi Mates!

any idea please why:

for local developemt purposes, in iFrame card I cannot place code like:

<iframe
  width="800"
  height="600"
  src="http://127.0.0.1:10001/api/photo?id={{photo_id}}&width=800"
  title="Foto"
  frameborder="0"
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
  allowfullscreen
></iframe>

also not src="http://myhost.com:10001 when putting myhost.com to the hosts file.

I shows that

I added of course these local "domains" to the Allowed domains for iframes in dashboards

myhost.com,
127.0.0.1,

Thanks!
Dawe

Hello there!

You need to include the port in the Allowed domains list, e.g 127.0.0.1:10001 (this is necessary because it is not a standard port like 80 for http or 443 for https).

4 Likes

Thanks very much Marcos!,
no idea why I have not tried this. :face_with_spiral_eyes:
D.

thanks marcos, it helped me as well.