apisix-dashboard
apisix-dashboard copied to clipboard
Why is there still this problem,grafana cannot be displayed
Issue description
Why is there still this problem,grafana cannot be displayed
Expected behavior
normal
How to Reproduce
Screenshots
Environment
- apisix version (cmd:
apisix version
): - OS (cmd:
uname -a
): - OpenResty / Nginx version (cmd:
nginx -V
oropenresty -V
): - etcd version, if have (cmd: run
etcd --version
): - apisix-dashboard version, if have:
- Browser version, if have:
Additional context
No response
I tried to change this configuration, but it has no effect
x_frame_options: "sameorigin"
Hi, @yigeqiji, I fixed that by updateing the allow_embedding
(under the security group) config item as true
in your Grafana configuration file and restart Grafana server.
# security
# ...
# set to true if you want to allow browsers to render Grafana in a <frame>, <iframe>, <embed> or <object>. default is false.
allow_embedding = true
I also getting the same issue, even though my current config is true for 'allow_embedding'
# security
# ...
# set to true if you want to allow browsers to render Grafana in a <frame>, <iframe>, <embed> or <object>. default is false.
allow_embedding = true

hello @yigeqiji The cause is due to the CSP (content-security-policy) and I think we can allow the iframe to fix it. you can custom CSP config here https://github.com/apache/apisix-dashboard/blob/master/api/conf/conf.yaml#L63-L69
please refer: https://apisix.apache.org/docs/dashboard/next/USER_GUIDE/
You can configure frame-src *
to allow all frame
Have you solved the prolem?
Have you solved the prolem? it'w work for me, add some lines in conf.yaml security: access_control_allow_credentials: true # support using custom cors configration access_control_allow_headers: "Authorization" access_control-allow_methods: "*" x_frame_options: "allow-from *" content_security_policy: "frame-src *;"
你解决问题了吗? 它对我有用,在 conf.yaml 中添加一些行 security: access_control_allow_credentials : true # support using custom cors configration access_control_allow_headers : "Authorization" access_control-allow_methods: "*" x_frame_options: "allow-from *" content_security_policy: " frame-源 *;" Have you solved the prolem?
yep,
yep,
是用你上面的配置吗?
yep,
是用你上面的配置吗?
not documented, facing the same bug
solved after following steps here