Skip to content

Commit

Permalink
Merge pull request #45 from josephholsten/cors
Browse files Browse the repository at this point in the history
add cors support
  • Loading branch information
webframp committed Apr 10, 2013
2 parents 39b0e35 + 6c51e47 commit 121bacc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions recipes/web.rb
Expand Up @@ -18,6 +18,7 @@
#

include_recipe "apache2::mod_python"
include_recipe "apache2::mod_headers"

basedir = node['graphite']['base_dir']
docroot = node['graphite']['doc_root']
Expand Down
4 changes: 4 additions & 0 deletions templates/default/graphite-vhost.conf.erb
Expand Up @@ -13,6 +13,10 @@ NameVirtualHost *:<%= node['graphite']['listen_port'] %>
ErrorLog <%= node['graphite']['storage_dir'] %>/log/webapp/error.log
CustomLog <%= node['graphite']['storage_dir'] %>/log/webapp/access.log common

Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "GET, OPTIONS"
Header set Access-Control-Allow-Headers "origin, authorization, accept"

<Location "/">
SetHandler python-program
PythonPath "['<%= node['graphite']['doc_root'] %>'] + sys.path"
Expand Down

0 comments on commit 121bacc

Please sign in to comment.