CS-11141: Allow X-Grafana-Device-Id in realm-server CORS preflight#4835
Merged
lukemelia merged 1 commit intoMay 14, 2026
Merged
Conversation
Grafana auto-attaches this header to button-panel POSTs, so the preflight for `_grafana-complete-job` (and the other `_grafana-*` operator actions) was being blocked by Chrome. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates realm-server CORS configuration so Grafana button-panel operator POSTs can pass Chrome preflight when Grafana attaches X-Grafana-Device-Id.
Changes:
- Adds
X-Grafana-Device-Idto the realm-server@koa/corsallowed request headers.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4 tasks
Contributor
Host Test Results 1 files 1 suites 3h 16m 44s ⏱️ Results for commit 754f730. For more details on these errors, see this check. Realm Server Test Results 1 files 1 suites 11m 9s ⏱️ Results for commit 754f730. |
backspace
approved these changes
May 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
X-Grafana-Device-Idto button-panel POSTs. Chrome was rejecting the preflight for_grafana-complete-job(and the other_grafana-*operator actions) because that header was not inAccess-Control-Allow-Headers.X-Grafana-Device-Idto the@koa/corsallowHeaderslist inpackages/realm-server/server.ts.Fixes CS-11141.
Test plan
_grafana-*operator actions (reindex, full-reindex, add-credit, upsert-realm-user-permission) still work from their button panels.🤖 Generated with Claude Code