summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef_zero/server.rb3
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.