# Getting Grafana "origin not allowed" error, with 403 in HTTP archive logs

**URL:** <https://community.grafana.com/t/getting-grafana-origin-not-allowed-error-with-403-in-http-archive-logs/117077>\
**Category:** Configuration\
**Created:** [March 15, 2024, 10:01am UTC](https://community.grafana.com/t/getting-grafana-origin-not-allowed-error-with-403-in-http-archive-logs/117077 "2024-03-15T10:01:21Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![raghava28041978](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/raghava28041978/32/43365_2.png) [@raghava28041978](https://community.grafana.com/u/raghava28041978)\
**Post date:** [March 15, 2024, 10:01am UTC](https://community.grafana.com/t/getting-grafana-origin-not-allowed-error-with-403-in-http-archive-logs/117077/1 "2024-03-15T10:01:21Z")

</div>

We have Grafana installed on AKS cluster. The Grafana instance is exposed publicly and we also have internal URL for Grafana. The Grafana Traffic comes and hits Application Gateway that has internal IP address of the Grafana ingress as a Backendpool. But this configuration gives 403 unauthorized error while trying to invite new user. But the invitation works on the internal Grafana URL, when browsed through a Virtual machine which is present in the same Vnet as the AKS cluster. Only ingress for Grafana is implemented without reverse proxy. Is it mandatory for us to use reverse proxy along with Grafana ingress for this config to work?

---

<div class="post-metadata">

**Author:** ![jangaraj](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/jangaraj/32/39197_2.png) [@jangaraj](https://community.grafana.com/u/jangaraj)\
**Post date:** [March 15, 2024, 10:35am UTC](https://community.grafana.com/t/getting-grafana-origin-not-allowed-error-with-403-in-http-archive-logs/117077/2 "2024-03-15T10:35:19Z")

</div>

You can have whatever (nginx, ALB, NLB, API GW, LB, reverse proxy, …) you want in front of Grafan. But Grafana must receive correct request `Host` header, which is matching domain configured in `root_url` in `grafana.ini`.

Documentation how to achieve that for some popular reverse proxies: [Run Grafana behind a reverse proxy | Grafana Labs](https://grafana.com/tutorials/run-grafana-behind-a-proxy/#configure-reverse-proxy)

---

<div class="post-metadata">

**Author:** ![raghava28041978](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/raghava28041978/32/43365_2.png) [@raghava28041978](https://community.grafana.com/u/raghava28041978)\
**Post date:** [March 15, 2024, 11:57am UTC](https://community.grafana.com/t/getting-grafana-origin-not-allowed-error-with-403-in-http-archive-logs/117077/3 "2024-03-15T11:57:54Z")

</div>

Thanks for your reply! root url is pointing to our internal grafana URL, which seems to be fine, but the requests are being made on the public URL. Can you please provide your email address so that, I can be in touch with you directly?

---

<div class="post-metadata">

**Author:** ![jangaraj](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/jangaraj/32/39197_2.png) [@jangaraj](https://community.grafana.com/u/jangaraj)\
**Post date:** [March 15, 2024, 12:00pm UTC](https://community.grafana.com/t/getting-grafana-origin-not-allowed-error-with-403-in-http-archive-logs/117077/4 "2024-03-15T12:00:50Z")

</div>

Sorry, this is community forum: [How to use the Grafana forums](https://community.grafana.com/t/how-to-use-the-grafana-forums/92154)

If you need “email support”, then I would recommend some paid Grafana Lab’s support/service, where you will have included support.

---

<div class="post-metadata">

**Author:** ![raghava28041978](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/raghava28041978/32/43365_2.png) [@raghava28041978](https://community.grafana.com/u/raghava28041978)\
**Post date:** [March 15, 2024, 3:43pm UTC](https://community.grafana.com/t/getting-grafana-origin-not-allowed-error-with-403-in-http-archive-logs/117077/5 "2024-03-15T15:43:48Z")

</div>

Thank you! We are using Grafana free version and its not Enterprise one. Do you do freelancing?

---

<div class="post-metadata">

**Author:** ![raghava28041978](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/raghava28041978/32/43365_2.png) [@raghava28041978](https://community.grafana.com/u/raghava28041978)\
**Post date:** [March 15, 2024, 4:30pm UTC](https://community.grafana.com/t/getting-grafana-origin-not-allowed-error-with-403-in-http-archive-logs/117077/6 "2024-03-15T16:30:33Z")

</div>

We tried all permutations and combinations with configuration of Grafana, but the issue still persists. The root\_url is configured as the internal URL of Grafana as per grafana.ini file in the pod. But still the issue persists.

---

<div class="post-metadata">

**Author:** ![jangaraj](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/jangaraj/32/39197_2.png) [@jangaraj](https://community.grafana.com/u/jangaraj)\
**Post date:** [March 15, 2024, 4:58pm UTC](https://community.grafana.com/t/getting-grafana-origin-not-allowed-error-with-403-in-http-archive-logs/117077/7 "2024-03-15T16:58:20Z")

</div>

> [@raghava28041978](#):
>
> We tried all permutations and combinations with configuration of Grafana

How many permutations and combinations is there possible? I think it is really high number.

---

<div class="post-metadata">

**Author:** ![raghava28041978](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/raghava28041978/32/43365_2.png) [@raghava28041978](https://community.grafana.com/u/raghava28041978)\
**Post date:** [March 15, 2024, 5:19pm UTC](https://community.grafana.com/t/getting-grafana-origin-not-allowed-error-with-403-in-http-archive-logs/117077/8 "2024-03-15T17:19:14Z")

</div>

Not many though 🙂 We have annotations section that has cors settings are present: [nginx.ingress.kubernetes.io/enable-cors:](http://nginx.ingress.kubernetes.io/enable-cors:) “true”  
[nginx.ingress.kubernetes.io/cors-allow-origin:](http://nginx.ingress.kubernetes.io/cors-allow-origin:)“URLs of internet and internal facing entries”. However, in grafana.ini we dont see these cors settings not sure why. Also the log location /var/log/grafana is empty. Nothing is registered there. In production instance we dont have this problem as both internal facing and internet facing URLs are one and the same.

---

<div class="post-metadata">

**Author:** ![jangaraj](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/jangaraj/32/39197_2.png) [@jangaraj](https://community.grafana.com/u/jangaraj)\
**Post date:** [March 15, 2024, 6:20pm UTC](https://community.grafana.com/t/getting-grafana-origin-not-allowed-error-with-403-in-http-archive-logs/117077/9 "2024-03-15T18:20:35Z")

</div>

> [@raghava28041978](#):
>
> [nginx.ingress.kubernetes.io/enable-cors:](http://nginx.ingress.kubernetes.io/enable-cors:) “true”

This is not a Grafana config. That’s K8S ingress config. But you don’t face CORS issue, so why you are configuring CORS then?

---

<div class="post-metadata">

**Author:** ![raghava28041978](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/raghava28041978/32/43365_2.png) [@raghava28041978](https://community.grafana.com/u/raghava28041978)\
**Post date:** [March 15, 2024, 6:30pm UTC](https://community.grafana.com/t/getting-grafana-origin-not-allowed-error-with-403-in-http-archive-logs/117077/10 "2024-03-15T18:30:38Z")

</div>

Thats right.Grafana has ingress and thats how we access it, it does not work with or without CORS. I just mentioned the kind of config we have. Also wile trying to invite users from internet facing portal we got 403 unauthorized error. But this error is persistent.

---

<div class="post-metadata">

**Author:** ![jangaraj](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/jangaraj/32/39197_2.png) [@jangaraj](https://community.grafana.com/u/jangaraj)\
**Post date:** [March 15, 2024, 6:33pm UTC](https://community.grafana.com/t/getting-grafana-origin-not-allowed-error-with-403-in-http-archive-logs/117077/11 "2024-03-15T18:33:45Z")

</div>

Let’s think:  
1.) How many domains you can have in root\_url?  
2.) How many domains you need to serve?

---

<div class="post-metadata">

**Author:** ![raghava28041978](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/raghava28041978/32/43365_2.png) [@raghava28041978](https://community.grafana.com/u/raghava28041978)\
**Post date:** [March 15, 2024, 6:40pm UTC](https://community.grafana.com/t/getting-grafana-origin-not-allowed-error-with-403-in-http-archive-logs/117077/12 "2024-03-15T18:40:54Z")

</div>

In the root URL, there is only one that is pointing to internal URL. There is only one parent domain and two child domains, one configured for internet access via CDN and the other configured as ingress of grafana on the aks cluster. The traffic comes from internet facing URL to Application gateway that has internal URL as the backend pool, so at last the traffic is served by internal URL.

---

<div class="post-metadata">

**Author:** ![jangaraj](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/jangaraj/32/39197_2.png) [@jangaraj](https://community.grafana.com/u/jangaraj)\
**Post date:** [March 15, 2024, 6:43pm UTC](https://community.grafana.com/t/getting-grafana-origin-not-allowed-error-with-403-in-http-archive-logs/117077/13 "2024-03-15T18:43:52Z")

</div>

So how can you achieve that Grafana will receive only the domain, which is configured in root\_url?

---

<div class="post-metadata">

**Author:** ![raghava28041978](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/raghava28041978/32/43365_2.png) [@raghava28041978](https://community.grafana.com/u/raghava28041978)\
**Post date:** [March 15, 2024, 6:47pm UTC](https://community.grafana.com/t/getting-grafana-origin-not-allowed-error-with-403-in-http-archive-logs/117077/14 "2024-03-15T18:47:33Z")

</div>

Correct, when we invite the user or do operations in the internet URL, the traffic ultimately reaches the internal URL and that it should serve the requests. The login of the internet facing URL works and later, it does not allow us to do any operations and each operation fails with “Origin not allowed” error.
