Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Docker 通过HTTP检索Grafana图表_Docker_Nginx_Reverse Proxy_Grafana - Fatal编程技术网

Docker 通过HTTP检索Grafana图表

Docker 通过HTTP检索Grafana图表,docker,nginx,reverse-proxy,grafana,Docker,Nginx,Reverse Proxy,Grafana,我在Grafana Dashboard中有一些图表,我希望将这些图表集成到我的网站上。我用的是Docker Grafana。我已经创建了API密钥,并在客户端复制了图表的链接。当我试图取回时,CORS出现了问题 错误: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resourc

我在Grafana Dashboard中有一些图表,我希望将这些图表集成到我的网站上。我用的是Docker Grafana。我已经创建了API密钥,并在客户端复制了图表的链接。当我试图取回时,CORS出现了问题

错误:

Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
在线可用的答案提到,我们需要通过配置文件,使用反向代理Nginx来设置HTTP头响应。但是我不知道如何使用Nginx。我是docker、grafana和nginx的新手

对于如何实现这一目标的明确步骤,我们将不胜感激