Hi,
I am trying to load dashboard specific URL from iframe of our web app but the Grafana redirects it to /api/dashboards/home
Dashboard specific URL is -
https://localhost/grafana/d/ICrAszxmk/pod-1?orgId=1&from=now%2Fy&to=now%2Fy&var-affiliate=defaultAffiliate
iframe code -
<iframe name="monitoringframe" id="monitoring" src="https://localhost/grafana/d/ICrAszxmk/pod-1?orgId=1&from=now%2Fy&to=now%2Fy&var-affiliate=defaultAffiliate" sandbox="allow-forms allow-popups allow-same-origin allow-scripts" width=100% height=600 border="0" frameborder="0" ></iframe>
If I hit the URL from the browser then it works perfectly. Grafana logs
-
for iframe access…showing that it is loading dashboard home
t=2018-11-06T11:37:44-0500 lvl=info msg=“Request Completed” logger=context userId=1 orgId=1 uname=admin method=GET path=/d/ICrAszxmk/pod-1 status=200 remote_addr=127.0.0.1 time_ms=5 size=37577 referer=-
t=2018-11-06T11:37:44-0500 lvl=info msg=“Request Completed” logger=context userId=1 orgId=1 uname=admin method=GET path=/d/ICrAszxmk/pod-1 status=200 remote_addr=127.0.0.1 time_ms=6 size=37577 referer=-
t=2018-11-06T11:37:44-0500 lvl=info msg=“Request Completed” logger=context userId=1 orgId=1 uname=admin method=GET path=/avatar/46d229b033af06a191ff2267bca9ae56 status=200 remote_addr=127.0.0.1 time_ms=2 size=720 referer=-
t=2018-11-06T11:37:44-0500 lvl=info msg=“Request Completed” logger=context userId=1 orgId=1 uname=admin method=GET path=/api/dashboards/home status=200 remote_addr=127.0.0.1 time_ms=3 size=1490 referer=- -
for browser access…showing that it is loading the dashboard
t=2018-11-06T11:38:03-0500 lvl=info msg=“Request Completed” logger=context userId=1 orgId=1 uname=admin method=GET path=/d/ICrAszxmk/pod-1 status=200 remote_addr=127.0.0.1 time_ms=5 size=37577 referer=-
t=2018-11-06T11:38:05-0500 lvl=info msg=“Request Completed” logger=context userId=1 orgId=1 uname=admin method=GET path=/avatar/46d229b033af06a191ff2267bca9ae56 status=200 remote_addr=127.0.0.1 time_ms=3 size=720 referer=-
t=2018-11-06T11:38:05-0500 lvl=info msg=“Request Completed” logger=context userId=1 orgId=1 uname=admin method=GET path=/api/dashboards/uid/ICrAszxmk status=200 remote_addr=127.0.0.1 time_ms=36 size=186479 referer=-
I am using Grafana grafana-5.3.2 windows version and it is running behind nginx reverse-proxy (version nginx-1.15.5)
Need help to understand why this is not working.
Thank you!