I can’t believe I can’t get this to work, and can’t find the right search terms to find a solution, but I’ve tried.
Just trying to render a basic URL after failing embedding a Grafana URL to prove that it should work, but it doesn’t. Tried in Safari and Chrome on two different OH3 installations.
config:
label: Grafana
sidebar: true
blocks:
- component: oh-block
config: {}
slots:
default:
- component: oh-grid-row
config: {}
slots:
default:
- component: oh-grid-col
config: {}
slots:
default:
- component: oh-webframe-card
config:
src: https://apple.com
masonry: null
grid: []
canvas: []
What am I missing? Both running a Snapshot install.
Apple won’t work because of their site configuration as a security measure. Here’s the error in the developer console (hit F12 on your browser, go to Console) I get when I try it:
Refused to display 'https://www.apple.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
As far as grafana, I get this when I try it on a test page:
Refused to display 'http://openhab:3000/' in a frame because it set 'X-Frame-Options' to 'deny'.
According to this, you need to set “allow_embedding=true” in your grafana config and I think that may fix it
Load denied by X-Frame-Options: <Panel_URL> does not permit framing - General - Grafana Labs Community Forums
1 Like
ahhh - thanks. I tried google and apple. Should have tried a simpler URL. Let me see if this is a Grafana embedding issue! I forgot I migrated that machine since I last tried this, pre-3.0.
In case anyone finds this thread helpful, I am running Grafana in a docker container now and you need to add this environment variable to the container as an alternative option to editing grafana.ini:
GF_SECURITY_ALLOW_EMBEDDING=true
1 Like