After learning that it’s possible to show an HTTP server in a component I began digging into how to get it to work.
I’m able to dynamically determine the path required to launch using code similar to this
const client = this.context.createResourceDataClient();
// Queries the "active device" on this page to find its HTTP server
client.query({
selector: 'Agent',
fields: ['servers.publicId', 'servers.type']
}, result => {
this.server = result[0].data.servers.find(server => server.type === 'http');
});
However, when I try to use this source in an iframe, it simply opens and redirects in a new tab.
I believe to properly allow an iframe to show a ‘webpage’ from another domain would require changing the CORS policy?
Can this be done via my portal settings?