diff options
author | Nathan L Smith <smith@getchef.com> | 2014-10-18 00:45:08 -0500 |
---|---|---|
committer | Nathan L Smith <smith@getchef.com> | 2014-10-18 00:45:56 -0500 |
commit | add50cdb0ecd99783b1316e3488f2b3900793183 (patch) | |
tree | facc21f2390ce8f991c30e2614ecc26008930a6e /lib/chef_zero/server.rb | |
parent | 468fa7c7d3a4e2f5925305e0f7211ce54e992916 (diff) | |
download | chef-zero-add50cdb0ecd99783b1316e3488f2b3900793183.tar.gz |
add CORS headernls/CORS
Diffstat (limited to 'lib/chef_zero/server.rb')
-rw-r--r-- | lib/chef_zero/server.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef_zero/server.rb b/lib/chef_zero/server.rb index db3f2a5..7d52b0b 100644 --- a/lib/chef_zero/server.rb +++ b/lib/chef_zero/server.rb @@ -559,6 +559,9 @@ module ChefZero # Insert Server header response[1]['Server'] = 'chef-zero' + # Add CORS header + response[1]['Access-Control-Allow-Origin'] = '*' + # Puma expects the response to be an array (chunked responses). Since # we are statically generating data, we won't ever have said chunked # response, so fake it. |