Grafana: Enterprise Edition without token, Version 8.3.6
InfluxDB: 1.8.10
OS: Debian 10
Dear all,
after upgrading my instance from version 8.3.4 I’m having problems with getting data from InfluxDB and navigating through Grafana. Whenever I try to change organization for instance, the following warning pops up: “Origin not allowed”. Here are some things I tried/observed:
Upgrade InfluxDB to the latest version
When I stop Influx the warning message is gone and I can navigate again. So I guess this is somehow related to Influx.
Tried upgrading Grafana on another device (Raspberry) without problems (InfluxDB 1.8.10, Grafana Community Edition) → Might only affect Enterprise Edition.
I’ve also tried to identify something odd in the logs, but I don’t see any errors. Please tell me if you need some more information.
In the case of Apache Server, you need to add ProxyPreserveHost on in your proxy configuration. In case of NGINX, you can need to add proxy_set_header Host $http_host; in your configuration.
I’m encountering the same error, but I’m not using any reverse proxies. Does that mean that I have to use a reverse proxy if I want grafana to be able to connect to prometheus?
what is your Host and Origin for your request? How is deployed your Grafana (you may think that you are not using proxy, but proxy can used by used infrastructure under the hood - e.g. Cloudfoundry, K8, …)?
While writing the response, I’ve just realiased that you’re referring to the proxy grafana is behind, not prometheus. I thought it was the other way around. I’ve just added the Host header and it’s worked. Thank you
Oh boy. I’m not sure what to do about this. I’m using nginx, and I already have proxy_set_header Host $http_host set in the configuration. I’m not quite sure where to go next.
I am encountering the same error “origin not allowed” while trying add any datasource. I am not using any proxy. Is there any way to fix this error without using proxy ?
My case: upgrading from 7.4.3 to 8.5.15. Users browsers get to Grafana via oauth-proxy running in kubernetes. Using tcpdump to look at the HTTP headers arriving at the Grafana host, we see “Host:” and “Origin:” which are different values, therefore triggering the “Origin not allowed” which is given by the snippet of code someone posted above.
The fix: set “pass_host_header = true” in the oauth-proxy config. Doing this now the “Host” and “Origin” headers match, and things work correctly.
We are using “Graphite” as DB to connect with Grafana. It worked until we use old version (grafana-7.5.11-2.el8.rpm) and post to the update, the databse connection not worked.
During graphite connection, I get the error “origin not allowed”. also Attached here.