Hi @rih
I'm not sure if this will ever work. Because if you run your portal and your iframe content under different origin url's, you will face various security restrictions.
As you already mentioned you need to change the X-FRAME-OPTIONS header so the iframe will be loaded by the browser, but this is not the end.
- You will also not be able to do various things via JS inside the iframe
- The session cookies will now be threaten as third-party cookies (cross-site cookies) as they will be received under another origin URL than the main document is loaded from.
I assume this is only a development environment issue, as you are developing your own portal and not developing it within the Designer?
With which technology do you developer this portal? Because sometimes they allow to setup a proxy service. With something like this, you can "open" the iframe content under the same origin URL as the portal and redirect the request in the server part to the actual page. E.g. in the JS world vite can do something like this out of the box: https://vite.dev/config/server-options.html#server-proxy and if you use something else, maybe there is a similar solution or there are also standalone solutions for problems like this.
I hope this helps