Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.
Using I-frame to load external webpage
-
This I-frame code works and loads the external page on our cloud server running outside our network. However when we run the same code on a box on our local network I get this error... Requests to the server have been blocked by an extension.
<iframe id="Weather_I-Frame" ng-init="WeatherPageShow=true" ng-show="WeatherPageShow" src="https://www.wunderground.com/weather-forecast/Nova_Scotia/Halifax.html?hdf=1" style="position: absolute; left: 0px; top: 0px; height: 100%; width: 100%;"></iframe>
How do I look for the issue stopping this from loading? I have stopped all chrome extensions with no effect.
I can also ping www.wunderground.com from the local system console. -
@Phillip-Weeks please read, it really makes it easier to help you
https://help.infiniteautomation.com/reporting-bugs/I suspect that it's due to CSP, this would be confirmed by your browser console messages.
This thread will tell you more about CSP and configuring it.
https://forum.infiniteautomation.com/topic/3577/query-an-external-web-service-from-a-mango-page -
Thanks Jared I read through the docs, it mentioned disabling the content security policy, I found the answer in the original post. Thanks
-
Jared in order to get the iframe to load the external web page I added the frame-src and domain...
web.security.contentSecurityPolicy=default-src 'self'; frame-src 'self' https://www.wunderground.com; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; connect-src ws: wss: 'self'; img-src 'self' data:
-
Thanks for sharing the resolution!
-
@Phillip-Weeks just a heads up to read the release notes when upgrading to Mango 3.4.5, the CSP configuration has changed in the env.properties file.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login