I try to run Grafana 11.0.0 on EC2 behind an Kong API Gateway
I can basically work with Grafana, login to grafana as admin and also creating user or dashboards is working fine.
However when I try to change my password as a user or delete a dashboard as admin I get the message “no route matched with those values”
When I try to create a service account as admin, I get the message “origin not allowed”
In the grafana.ini I configured the section [server] like this:
[server]
domain = my_domain
root_url = %(protocol)s://%(domain)s:%(http_port)s/dev-grafana/
serve_from_sub_path = true
I have found solutions for this problem for nginx (proxy_set_header Host $http_host;), but I fail with our company solution with the Kong
Every idea is very welcome
Your proxy (kong api gw) must set header, which is matching configured domain/root url. So check your proxy doc how to do that.
Thanks for your replay,
I can set header in Kong with a PlugIn .
Unfortunately, I have not yet had any success.
I’m probably making a mistake somewhere, so I’ll try to show you my setup and the current headers I’m trying to use.
Setup:
Try changing pwd
Request details:
I tried to set Host to
“HostA”
“HostA/dev-grafana”
“https://HostA”
“https://HostA/dev-grafana”
but nothing worked.
I hope you see my mistake and can give me another hint
[server]
root_url = https://HostA/dev-grafana/
serve_from_sub_path = true
Thanks jangaraj!
In my case, I finally found a solution to run Grafana behind a Kong Api Gateway.
First, of course, the grafana.ini must be provided with the entries:

If this entry is not set, Grafana cannot be reached at all.
It was NOT necessary to add this entry to the header:
“Host: HostA”
The problem was located in the ROUTE settings.
The following must be set
- methods: GET, POST, PUT, DELETE
- preserver host: YES
Then it worked in my case to change a password, delete dashboards etc.