Display grafana-web-page inside webvisu

Hi @schweichichi,
For security reason embedding webpage in another is by default disabled.
To allow embedding, you can modify the grafana config file, but it looks more convenient to do it using an environment variable, so you can add the following parameter to your docker run command :

-e "GF_SECURITY_ALLOW_EMBEDDING=true" -e "GF_AUTH_ANONYMOUS_ENABLED=true" 

The first allow embedding and the second disable the authentication, this is probably what you want to consider.

Also you will have to enable http port on the CC100 WBM, since embedding http iframe in http webpage isn’t allowed.

You need to modify the lighttpd web server configuration of the CC100.
Edit the file /etc/lighttpd/webvisu.conf

Change the line

setenv.set-response-header  += ("Content-Security-Policy" => "default-src 'self' 'unsafe-inline'”)

by :

setenv.set-response-header  += ("Content-Security-Policy" => "default-src 'self' 'unsafe-inline';frame-src * 'unsafe-inline' 'unsafe-eval'")

Restart the webserver :

/etc/init.d/lighttpd restart

Of course you should consider the security impacts of doing this…

You should add the kiosk parameter in the iframe URL in order to hide the menu, example :

http://[grafanaURL]:3000/d/[dashboardID]/[dashboardname]?kiosk
4 Likes