iFrame not working on session

Hello everyone, I'm trying to view something on iFrame component. When I write the hostname in the src, it works fine in the designer and also in the perspective session on the gateway host (server). But it doesn't work on any of the clients workstations that are connected to the server.

http://serverhostname/test/something

So I tried to put the IP address of the server instead of its hostname. It stopped working in the designer once I put IP instead of hostname, so I tried to open the link in google chrome on the server, and I found that it asks me to authenticate.

http://serverIP/test/something

So I passed the username and password inside the URL and it worked fine in google chrome on the server.

http://username:password@serverIP/test/something

I put the same URL including the username and password in the designer, but it didn't work, and also didn't work for perspective sessions on server nor clients.

Any help would be appreciated

This kinda thing is probably blocked by the webbrowser security for iframes.
You should not use this as it would be to easy to recover the name and password when used in an iframe.

Are you trying to watch a perspective page in the iframe or is it something else you are hosting?

Yes, I totally understand that it's not recommended, but I'm trying to trace the issue.
No, I'm trying to host something else.

1 Like

Its not just not recommended, its might activily be blocked by the browser.

are you using http or http? because this might also be a security issue blocked by the browser , try using https

in addition to one of the above you can also try adding in a "/" at the very end of the url.

Are you in control of this hosted page, or is this something from an external website?

I'm using http and it's blocked also inside Ignition designer and perspective workstation application not only on browsers. I tried "/" and didn't work either.

perspective workstation also uses a chromium browser

Have you verified that the site you are trying to wrap in an IFrame allows wrapping in an IFrame? With the appropriate headers? Either an X-Frame-Options header (but that's now obsolete) or a Content-Security-Policy header? If not, you will not be able to use an IFrame.