only allow cors on api routes
This commit is contained in:
parent
7de642ccb2
commit
e27d64e643
1 changed files with 1 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
Rails.application.config.middleware.insert_before 0, Rack::Cors do
|
Rails.application.config.middleware.insert_before 0, Rack::Cors do
|
||||||
allow do
|
allow do
|
||||||
origins '*'
|
origins '*'
|
||||||
resource '*',
|
resource '/api/*',
|
||||||
headers: :any,
|
headers: :any,
|
||||||
methods: [:get, :post, :put, :delete, :options, :head]
|
methods: [:get, :post, :put, :delete, :options, :head]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue