projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c5db11
)
Configure CORS to allow GET and POST to /oauth
author
Tom Hughes
<tom@compton.nu>
Fri, 16 Nov 2012 22:28:52 +0000
(22:28 +0000)
committer
Tom Hughes
<tom@compton.nu>
Fri, 16 Nov 2012 22:28:52 +0000
(22:28 +0000)
config/initializers/cors.rb
patch
|
blob
|
history
diff --git
a/config/initializers/cors.rb
b/config/initializers/cors.rb
index 6fbeb916127e9117bfd3363f419013fdb4747410..9bbf937cfef24cc0493251c971fd918377434001 100644
(file)
--- a/
config/initializers/cors.rb
+++ b/
config/initializers/cors.rb
@@
-8,6
+8,7
@@
require "rack/cors"
Rails.configuration.middleware.use Rack::Cors do
allow do
origins "*"
+ resource "/oauth/*", :headers => :any, :methods => [:get, :post]
resource "/api/*", :headers => :any, :methods => [:get, :post, :put, :delete]
end
end