Skip to content

Commit

Permalink
Restrict CORS to API only
Browse files Browse the repository at this point in the history
Previously this was missing the leading slash
  • Loading branch information
nikolai-b committed Aug 13, 2018
1 parent a59913a commit a2906f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/cors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Application < Rails::Application
config.middleware.insert_before 0, "Rack::Cors" do
allow do
origins '*'
resource '*', headers: :any, methods: [:get, :post, :options], credentials: false
resource '/api/*', headers: :any, methods: [:get, :post, :options], credentials: false
end
end
end
Expand Down

0 comments on commit a2906f6

Please sign in to comment.