-
I am using Grafana 9.1.2 version on Ubuntu 22.04 operating system.
-
I am trying to achieve embed a panel from the dashboard into the Power BI.
-
I have enabled all the required configurations to make iframe embedding available and it works perfectly fine on an HTML static page. But then I encountered the CORS issue when I integrated Power BI with the Grafana dashboard panel which is also resolved by running Grafana behind a reverse proxy using Nginx.
-
Now, I am facing Failed to read the ‘cookie’ property from ‘Document’: The document is sandboxed and lacks the ‘allow-same-origin’ flag.
-
This was working fine as I have successfully embedded my company website URL in Power BI’s iframe.
-
the configuration(s):
grafana
allow_embedding = true
enabled = true
org_name = Kube Network
org_role = Viewer
hide_version = true
nginx
server {
listen 443;
ssl on;
ssl_certificate /etc/grafana/abc.crt;
ssl_certificate_key /etc/grafana/def.key;
server_name monitoring.*****.net;
listen 80;
access_log /var/log/nginx/grafana.log;
location / {
add_header Access-Control-Allow-Origin "*";
add_header "Access-Control-Allow-Credentials" "true";
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS";
add_header "Access-Control-Allow-Headers" "Authorization, origin, accept";
proxy_pass http://grafana.staged-by-discourse.com;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
- Not showing any error in Grafana logs nor Nginx logs. But I caught this error in the Power BI web interface in Chrome. Does anyone have any clue what is going on in my scenario?
- I have followed online instructions.
https://localhost:3000/t/how-to-allow-access-control-allow-origin-for-all-the-apis/2045/5