"Origin Not Allowed" Error When Adding Loki as a Data Source in Grafana

I am using the latest version of Grafana. When running it locally on my machine, everything works fine. However, after deploying Grafana and Loki on a server using Docker, I encounter an “Origin not allowed” error when trying to add Loki as a data source.

Additionally, I am using NGINX as a reverse proxy. I suspect this might be causing the issue, but I am unsure of the exact configuration needed to resolve it.

Environment Details

  • Grafana Version**: Latest (installed via Docker)
  • Loki Version: Latest (installed via Docker)
  • NGINX: Configured as a reverse proxy
  • Deployment Method: Docker