From fe1b569e5bdb751cf10a35320e09f2b30af6c4cb Mon Sep 17 00:00:00 2001 From: Timothy Chavez Date: Fri, 3 Apr 2015 11:28:13 -0500 Subject: [PATCH] Enable simple CORS requests Graphite needs to enable simple CORS requests so that third-party services that want to pull data via the API to build things like interactive graphs and visualization dashboards can do that. Change-Id: I34a422c787118425aa484fa980aadd47cbf197e2 --- templates/graphite.vhost.erb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/graphite.vhost.erb b/templates/graphite.vhost.erb index 68100ed..6adc436 100644 --- a/templates/graphite.vhost.erb +++ b/templates/graphite.vhost.erb @@ -20,6 +20,10 @@ ErrorLog /var/log/apache2/graphite-error.log CustomLog /var/log/apache2/graphite-access.log common + # Add CORS authorization to the header so third-party services can pull + # metrics data via API calls for things like vizualiation dashboards. + Header set Access-Control-Allow-Origin "*" + # I've found that an equal number of processes & threads tends # to show the best performance for Graphite (ymmv). WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120