Hi! I checked the code of the RunStream(ctx context.Context, request *backend.RunStreamRequest, sender *backend.StreamSender) error function but can’t define how to get X-Grafana-User header?
Those headers doesn’t present in the request object and in the sender.
Even if i use the middlewares for the Live stream those middleware skipped and headers setted by middlewares skipped.
academo
February 12, 2025, 8:31am
2
Hi @kozlovdmitriyy
you must enable grafana to send that header in your config file. here’s the config key
# A value of zero (0) means no limit.
max_conns_per_host = 0
# The maximum number of idle connections that Grafana will keep alive.
max_idle_connections = 100
# How many seconds the data proxy keeps an idle connection open before timing out.
idle_conn_timeout_seconds = 90
# If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request.
send_user_header = false
# Limit the amount of bytes that will be read/accepted from responses of outgoing HTTP requests.
response_limit = 0
# Limits the number of rows that Grafana will process from SQL data sources.
row_limit = 1000000
# Sets a custom value for the `User-Agent` header for outgoing data proxy requests. If empty, the default value is `Grafana/<BuildVersion>` (for example `Grafana/9.0.0`).
user_agent =
Hi! Thank you for your reply it is enabled, but header doesn’t appear
system
Closed
February 12, 2026, 9:46am
4
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.