Commit e0cf5c6c

mo khan <mo@mokhan.ca>
2014-11-23 05:26:44
fix the CORS configuration.
1 parent c28c20f
Changed files (1)
config/application.rb
@@ -36,7 +36,8 @@ module Cake
     config.middleware.use Rack::Cors do
       allow do
         origins "*"
-        resource "api/*", headers: :any, methods: [:get, :post, :put, :delete, :options]
+        resource "/api/v2/*", headers: :any, methods: [:get, :post, :put, :delete, :options]
+        resource "/api/v2/*/*", headers: :any, methods: [:get, :post, :put, :delete, :options]
       end
     end
     config.middleware.use ExceptionNotification::Rack, :email => {