Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Embed Grafana iframe #86

Open
vschinazi opened this issue Jun 20, 2020 · 1 comment
Open

Embed Grafana iframe #86

vschinazi opened this issue Jun 20, 2020 · 1 comment

Comments

@vschinazi
Copy link

Hi Chris

I'm trying to change the security settings in Grafana so I can embed my dashboard as an iframe in my website. I was able to locate and edit the grafana.ini file in the etc/grafana folder but it seems to revert back to default after I change it. Is this the correct file to be editing or is there another "default.ini" file?

Specifically (see attached) I would like to change the security settings:

allow_embedding | false
cookie_samesite | lax

to

allow_embedding | true
cookie_samesite | none

Can you please let me know how to do this or if there is another way to embed the dashboard into a website.

Thank you,

Victor

Screenshot 2020-06-20 at 10 53 41

@chrisys
Copy link
Member

chrisys commented Jul 16, 2020

@vschinazi I think you should be able to do this via environment variables in docker-compose.yml. They follow a convention so it could be GF_SECURITY_ALLOW_EMBEDDING=true and GF_SECURITY_COOKIE_SAMESITE=none. I've not tested these specific ones but you'll see in the compose file there are already some others set.

See here for more info: https://grafana.com/docs/grafana/latest/administration/configuration/#configure-with-environment-variables

Let us know if it works!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants