I am attempting to display information from a 3rd party webserver via an iframe in my WebIQ project(2.15.7). I believe I need to set some HTTP headers to allow for the connection to the external web server. WebIQ feature 3476 from the 2.13.0 release states the CORS headers can now be configured for the WebIQ server. How do I configure these?
Best reply by webiq-sk
This is actually not a question about WebIQ, but about web technology in general, because WebIQ doesn't embed any websites, it just tells the browser where to load a document from through the URL - the browser then loads the URL. Opening the browser's developer tools usually by pressing F12 will also tell you exactly where the problem is:
Also, you are confusing source and target here: the feature you mention is about allowing embedding of a WebIQ HMI into another website, not vice versa.ย
For security reasons the website to be embedded has to allow the embedding, because that's the way to secure the internet (as such you can configure this for WebIQ if you want to embed a WebIQ HMI in another website). You cannot embed facebook.com in an iFrame on any website, but you can embed example.com - which is because example.com allows that whereas facebook.com doesn't allow it.