lib/jets/controller/rendering/rack_renderer.rb in jets-1.6.5 vs lib/jets/controller/rendering/rack_renderer.rb in jets-1.6.6

- old
+ new

@@ -191,9 +191,14 @@ when true { "Access-Control-Allow-Origin" => "*", # Required for CORS support to work "Access-Control-Allow-Credentials" => "true" # Required for cookies, authorization headers with HTTPS } + when String + { + "Access-Control-Allow-Origin" => Jets.config.cors, # contains Hash with Access-Control-Allow-* values + "Access-Control-Allow-Credentials" => "true" # Required for cookies, authorization headers with HTTPS + } when Hash Jets.config.cors # contains Hash with Access-Control-Allow-* values else {} end