Skip to content

Using external javascript with oc lazy load

vbier edited this page Apr 7, 2018 · 2 revisions

In case you use external javascript files residing on your openHAB server, make sure to only use relative paths when referencing the scripts, as otherwise loading will be prohibited by the Content Security Policy enforced by HABPanel.

If you really want to use absolute URLs, the JS URL has to have the exact same protocal, hostname and port. So when accessing your HABPanel pages via URL https://openhabianpi:8443/habpanel/index.html#/, only javascript locations starting with https://openhabianpi:8443/ are allowed.

Examples of invalid URLs would be: