<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Cloudron v6.2.4 - Nginx Access-Control-Allow-Origin Policy blocks Grafana to access Prometheus]]></title><description><![CDATA[<p dir="auto">Tested on Cloudron v6.2.4:</p>
<p dir="auto">Install Grafana, install Prometheus.<br />
Add Prometheus in Grafana as Datasource.<br />
Get:</p>
<pre><code>Unknown error during query transaction. Please check JS console logs.
</code></pre>
<pre><code>&gt; Access to fetch at 'https://prometheus.domain.tld./login?redirect=/api/v1/query?query=1%2B1&amp;time=1615638775.765' (redirected from 'https://grafana.domain.tld/api/datasources/proxy/5/api/v1/query?query=1%2B1&amp;time=1615638775.765') from origin 'https://grafana.domain.tld' 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. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
&gt; tti-polyfill.js:4 GET https://prometheus.domain.tld/login?redirect=/api/v1/query?query=1%2B1&amp;time=1615638775.765 net::ERR_FAILED
</code></pre>
<p dir="auto"><img src="/assets/uploads/files/1615639388226-5697335b-f015-4b63-9801-93273982c911-image-resized.png" alt="5697335b-f015-4b63-9801-93273982c911-image.png" class="img-markdown  img-fluid" /></p>
<p dir="auto">Testing this on Cloudron v.6.1.2 with no problems.</p>
<p dir="auto"><img src="/assets/uploads/files/1615639236654-b7c55ce5-93b0-4a01-8a78-03f510f22203-image-resized.png" alt="b7c55ce5-93b0-4a01-8a78-03f510f22203-image.png" class="img-markdown  img-fluid" /></p>
]]></description><link>https://forum.cloudron.io/topic/4662/cloudron-v6-2-4-nginx-access-control-allow-origin-policy-blocks-grafana-to-access-prometheus</link><generator>RSS for Node</generator><lastBuildDate>Thu, 19 Nov 2026 02:00:44 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/4662.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 13 Mar 2021 12:41:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Cloudron v6.2.4 - Nginx Access-Control-Allow-Origin Policy blocks Grafana to access Prometheus on Wed, 17 Mar 2021 21:08:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> On it.</p>
<hr />
<p dir="auto">Neat! This fixed it. Big thanks for the uddate.</p>
]]></description><link>https://forum.cloudron.io/post/28112</link><guid isPermaLink="true">https://forum.cloudron.io/post/28112</guid><dc:creator><![CDATA[BrutalBirdie]]></dc:creator><pubDate>Wed, 17 Mar 2021 21:08:20 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron v6.2.4 - Nginx Access-Control-Allow-Origin Policy blocks Grafana to access Prometheus on Wed, 17 Mar 2021 18:24:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/brutalbirdie" aria-label="Profile: brutalbirdie">@<bdi>brutalbirdie</bdi></a> I have enabled it in package v1.4.1 . Can you please try?</p>
]]></description><link>https://forum.cloudron.io/post/28102</link><guid isPermaLink="true">https://forum.cloudron.io/post/28102</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Wed, 17 Mar 2021 18:24:54 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron v6.2.4 - Nginx Access-Control-Allow-Origin Policy blocks Grafana to access Prometheus on Wed, 17 Mar 2021 17:56:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/brutalbirdie" aria-label="Profile: brutalbirdie">@<bdi>brutalbirdie</bdi></a> yes, that is most likely the issue. Let me try to push a fix.</p>
]]></description><link>https://forum.cloudron.io/post/28098</link><guid isPermaLink="true">https://forum.cloudron.io/post/28098</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Wed, 17 Mar 2021 17:56:23 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron v6.2.4 - Nginx Access-Control-Allow-Origin Policy blocks Grafana to access Prometheus on Wed, 17 Mar 2021 10:51:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> Good question.<br />
Since prometheus does use <code>proxyAuth</code> and grafana tries to auth via basic auth.<br />
Could this be a problem? I think I've read something on the forum about a problem with <code>proxyAuth</code>?</p>
]]></description><link>https://forum.cloudron.io/post/28060</link><guid isPermaLink="true">https://forum.cloudron.io/post/28060</guid><dc:creator><![CDATA[BrutalBirdie]]></dc:creator><pubDate>Wed, 17 Mar 2021 10:51:08 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron v6.2.4 - Nginx Access-Control-Allow-Origin Policy blocks Grafana to access Prometheus on Wed, 17 Mar 2021 04:08:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/brutalbirdie" aria-label="Profile: brutalbirdie">@<bdi>brutalbirdie</bdi></a> I haven't tried this yet. Do you know if this setup requires basic auth to work in the apps?</p>
]]></description><link>https://forum.cloudron.io/post/28045</link><guid isPermaLink="true">https://forum.cloudron.io/post/28045</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Wed, 17 Mar 2021 04:08:28 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron v6.2.4 - Nginx Access-Control-Allow-Origin Policy blocks Grafana to access Prometheus on Sun, 14 Mar 2021 12:31:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> Yes I'm also very confused about this issue.<br />
And also that no one else reported this so far.</p>
<p dir="auto">Did you test said issue and could replicate it <a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a>?</p>
]]></description><link>https://forum.cloudron.io/post/27775</link><guid isPermaLink="true">https://forum.cloudron.io/post/27775</guid><dc:creator><![CDATA[BrutalBirdie]]></dc:creator><pubDate>Sun, 14 Mar 2021 12:31:18 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron v6.2.4 - Nginx Access-Control-Allow-Origin Policy blocks Grafana to access Prometheus on Sun, 14 Mar 2021 03:20:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/brutalbirdie" aria-label="Profile: brutalbirdie">@<bdi>brutalbirdie</bdi></a> Nothing has changed in the reverse proxy configs other than referrer-policy. So, I am surprised that it worked before. I can only think of some app update causing a problem.</p>
]]></description><link>https://forum.cloudron.io/post/27749</link><guid isPermaLink="true">https://forum.cloudron.io/post/27749</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Sun, 14 Mar 2021 03:20:24 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron v6.2.4 - Nginx Access-Control-Allow-Origin Policy blocks Grafana to access Prometheus on Sat, 13 Mar 2021 22:17:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a><br />
My problem with that is, both Grafana and Prometheus did not get updated for 2 weeks on the <code>v6.2.4</code> instance.<br />
<code>Grafana 7.4.3</code> and <code>Prometheus Server 2.25.0</code><br />
They did not change but the version of Cloudron got upgraded from <code>v6.1.2</code> =&gt; <code>v6.2.4</code> that's the only thing that changed.</p>
]]></description><link>https://forum.cloudron.io/post/27742</link><guid isPermaLink="true">https://forum.cloudron.io/post/27742</guid><dc:creator><![CDATA[BrutalBirdie]]></dc:creator><pubDate>Sat, 13 Mar 2021 22:17:38 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron v6.2.4 - Nginx Access-Control-Allow-Origin Policy blocks Grafana to access Prometheus on Sat, 13 Mar 2021 19:37:17 GMT]]></title><description><![CDATA[<p dir="auto">It seems one can set --web.cors.origin as per <a href="https://manpages.debian.org/unstable/prometheus/prometheus.1.en.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://manpages.debian.org/unstable/prometheus/prometheus.1.en.html</a> . I guess we have to fix the Cloudron package to have CLI args.</p>
]]></description><link>https://forum.cloudron.io/post/27734</link><guid isPermaLink="true">https://forum.cloudron.io/post/27734</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Sat, 13 Mar 2021 19:37:17 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron v6.2.4 - Nginx Access-Control-Allow-Origin Policy blocks Grafana to access Prometheus on Sat, 13 Mar 2021 19:29:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/brutalbirdie" aria-label="Profile: brutalbirdie">@<bdi>brutalbirdie</bdi></a> CORS headers are set by the app, it shouldn't be platform related. So, if Grafana cannot access prometheus, it's because prometheus needs some CORS setting.</p>
]]></description><link>https://forum.cloudron.io/post/27733</link><guid isPermaLink="true">https://forum.cloudron.io/post/27733</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Sat, 13 Mar 2021 19:29:24 GMT</pubDate></item><item><title><![CDATA[Reply to Cloudron v6.2.4 - Nginx Access-Control-Allow-Origin Policy blocks Grafana to access Prometheus on Sat, 13 Mar 2021 17:50:09 GMT]]></title><description><![CDATA[<p dir="auto">I tried looking into the diff of Box <code>v6.1.2</code> and <code>v6.2.4</code></p>
<p dir="auto"><a href="https://git.cloudron.io/cloudron/box/-/compare/v6.1.2...v6.2.4" target="_blank" rel="noopener noreferrer nofollow ugc">https://git.cloudron.io/cloudron/box/-/compare/v6.1.2...v6.2.4</a></p>
<p dir="auto">Found this line</p>
<p dir="auto"><a href="https://git.cloudron.io/cloudron/box/-/compare/v6.1.2...v6.2.4#65b4484c1d799a34df752a8f7b9be90aca54aef6_98_98" target="_blank" rel="noopener noreferrer nofollow ugc">https://git.cloudron.io/cloudron/box/-/compare/v6.1.2...v6.2.4#65b4484c1d799a34df752a8f7b9be90aca54aef6_98_98</a></p>
<pre><code class="language-diff">- add_header Referrer-Policy "same-origin";
+ proxy_hide_header Referrer-Policy;
</code></pre>
<p dir="auto"><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy" target="_blank" rel="noopener noreferrer nofollow ugc">https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy</a></p>
<p dir="auto">Then I tried to edit <code>/etc/nginx/applications/default.conf</code> and the both apps from Grafana and Prometheus to add cors:</p>
<p dir="auto"><a href="https://enable-cors.org/server_nginx.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://enable-cors.org/server_nginx.html</a></p>
<p dir="auto">Nothing worked, I am clueless.</p>
]]></description><link>https://forum.cloudron.io/post/27727</link><guid isPermaLink="true">https://forum.cloudron.io/post/27727</guid><dc:creator><![CDATA[BrutalBirdie]]></dc:creator><pubDate>Sat, 13 Mar 2021 17:50:09 GMT</pubDate></item></channel></rss>