From 05acf3a91a9df0ec59706345c2b7d42b96a04a9c Mon Sep 17 00:00:00 2001 From: Josh W Lewis Date: Tue, 3 May 2016 17:43:21 -0500 Subject: [PATCH] Support 'Origin' CORS for Safari Some Safari versions will reject CORS responses without this. Additional details: https://github.com/cyu/rack-cors/issues/116 --- lib/pliny/middleware/cors.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pliny/middleware/cors.rb b/lib/pliny/middleware/cors.rb index 82f78f36..445e857b 100644 --- a/lib/pliny/middleware/cors.rb +++ b/lib/pliny/middleware/cors.rb @@ -4,7 +4,7 @@ class CORS ALLOW_METHODS = %w( GET POST PUT PATCH DELETE OPTIONS ).freeze ALLOW_HEADERS = - %w( Content-Type Accept Authorization Cache-Control If-None-Match If-Modified-Since ).freeze + %w( Content-Type Accept Authorization Cache-Control If-None-Match If-Modified-Since Origin).freeze EXPOSE_HEADERS = %w( Cache-Control Content-Language Content-Type Expires Last-Modified Pragma ).freeze