Community
Community copied to clipboard
How to enable Cors for containers? (Embedding Grafana in Organizr)
Hello,
I am trying to use a Grafana Dashboard as the Homepage for Organizr. I installed Grafana using the community tag. security.allow_embedding is enabled.
When I set the dashboard as the homepage, I get a CORS error:
Access to XMLHttpRequest at 'https://grafana.mydomain.com/goto/grafanaid?orgId=1' from origin 'https://organizr.mydomain.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I can not figure out where I can set the headers I need. I tried setting in /opt/nginx/vhost.d/grafana.mydomain.com and /opt/nginx/vhost.d/grafana.mydomain.com_location with no luck.
Editing default.conf is not an option since it is generated automatically when starting the container.