Access-Control-Allow-Origin
Closed this issue · 3 comments
Hi All,
I'm trying to run Tasseo for the first time. I have a Graphite instance running at localhost:8080 and the Tasseo server at localhost:5000. I've exported GRAPHITE_URL=http://localhost:8080 and created an example dashboard in Tasseo. No auth is required to access my Graphite. However, I'm facing the following Javascript error:
XMLHttpRequest cannot load http://localhost:8080/render/?target=keepLastValue(system.loadavg_15min)&from=-5minutes&format=json.
Origin http://localhost:5000 is not allowed by Access-Control-Allow-Origin.
My dashboard file looks like this:
var metrics =
[
{
"alias": "system.loadavg_15min",
"target": "system.loadavg_15min",
"warning": 100,
"critical": 500
}
];
I'm able to retrieve successful responses with data from Graphite when I point my browser to the Graphite query url.
I read your README several time to make sure I followed every required steps. Anyway, is there anything I might be missing? Is there anything I have to change in the Tasseo code (I wouldn't expect that)?
Thanks
It's right there in the README. 😸
https://github.com/obfuscurity/tasseo#graphite-server-configuration
I forgot to mention that I have that configured already and the problem is still the same :(
Regardless, that's where your problem lies. Make sure your origin actually matches with what the server is configured to allow.