Skip to content

Commit bc80d0d

Browse files
szedan-rhclaude
andcommitted
fix: configure Grafana for iframe embedding in dashboard
Added required Grafana environment variables for proper iframe embedding: - GF_SERVER_SERVE_FROM_SUB_PATH=true: Allows serving from /embedded/grafana - GF_SERVER_ROOT_URL: Configures correct URL context with dynamic domain - GF_SECURITY_ALLOW_EMBEDDING=true: Permits iframe embedding - GF_AUTH_ANONYMOUS_ENABLED=false: Keeps authentication required This fixes the "localhost refused to connect" error after login by ensuring Grafana uses the correct URL context instead of redirecting to localhost. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2da09c6 commit bc80d0d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

deploy/openshift/observability/grafana/deployment.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ spec:
4848
value: ""
4949
- name: GF_PATHS_PROVISIONING
5050
value: /etc/grafana/provisioning
51+
- name: GF_SERVER_SERVE_FROM_SUB_PATH
52+
value: "true"
53+
- name: GF_SERVER_ROOT_URL
54+
value: "%(protocol)s://%(domain)s/embedded/grafana"
55+
- name: GF_SECURITY_ALLOW_EMBEDDING
56+
value: "true"
57+
- name: GF_AUTH_ANONYMOUS_ENABLED
58+
value: "false"
5159
volumeMounts:
5260
- name: storage
5361
mountPath: /var/lib/grafana

0 commit comments

Comments
 (0)