You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Grafana面板嵌入Power BI遇阻,配置Nginx后仍报错求助

Grafana面板嵌入Power BI的CORS问题排查求助

环境信息

  • 系统:Ubuntu 22.04
  • Grafana版本:9.1.2

问题背景

我尝试将Grafana仪表盘中的面板嵌入Power BI,已启用iframe嵌入所需的全部Grafana配置,在静态HTML页面中可正常显示,但集成到Power BI时遇到CORS问题。之后通过Nginx反向代理部署Grafana尝试解决,但问题依旧。此前已成功将公司网站URL嵌入Power BI的iframe中。

已配置内容

Grafana配置

content_security_policy = true
allow_embedding = true
enabled = true
org_name = Kube Network
org_role = Viewer
hide_version = true

Nginx反向代理配置

server {
listen 443 ssl;
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://localhost:3000;
            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;
    }
}

当前状态

Grafana和Nginx日志均未显示错误,但在Chrome浏览器的Power BI网页界面中仍捕获到CORS相关报错(附截图),求帮忙排查此问题。

内容的提问来源于stack exchange,提问作者Adeel

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.20 20:27:49