Unable to display a dashboard in a iframe or a browser

Hello, I am just starting to use Grafana…
I am using Grafana v8.1.1 in a docker with Home assistant in another docker
I have created a small dashboard and I copy the link and paste it in an iframe in HA
or in a browser
I have a Access denied to this dashboard
of course, I have set anonymous enabled to true
image

in the log :

I am lost, I have read a lot on internet but I cannot find a solution

thanks for any help

I have set the log level to debug:
it is the log when I try to display the dashboard from a browser :

I read a lot of posts on internet but cannot find a solution

I hope somebody will help me
thanks

I have deleted the grafana container and reinstall it, now it is working from a browser but not from home assistant, I got the error : 192.168.1.104 refused the connection

nothing in the log of grafana ??

If Grafana works in a browser but not in Home Assistant then you are probably
best advised to ask about this on a list or forum focused on Home Assistant,
since that seems to be the part that isn’t working whereas Grafana is working
(so long as you connect with a browser).

Antony.

I have found the solution and the problem was with grafana
I have to set up :
GF_SECURITY_COOKIE_SAMESITE to none or disabled
and
GF_SECURITY_ALLOW_EMBEDDING to true

problem solved

thanks

1 Like

I am using a Proxy (Caddy) to access Home Assistant via HTTPS. Grafana is running as an Add-On in Home Assistant.

Especially within the Home Assistant Companion App it took me a some hours until I eventually got it working! :slight_smile:

- name: GF_SECURITY_ALLOW_EMBEDDING
  value: "true"
- name: GF_SECURITY_CONTENT_SECURITY_POLICY
  value: "false"
- name: GF_SECURITY_COOKIE_SAMESITE
  value: none
- name: GF_SECURITY_COOKIE_SECURE
  value: "true"
- name: GF_AUTH_ANONYMOUS_ENABLED
  value: "true"

This is my full Home Assistant Grafana Add-On configuration:

Rüdiger

You have sacrificed security. I would recommend that only for those who know what they are doing.