Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit e4356bd

Browse files
authored
Merge pull request #706 from alphagov/remove-unused-rack-cors
Remove unused Rack::Cors plugin
2 parents 962ff38 + 67d4193 commit e4356bd

File tree

3 files changed

+0
-15
lines changed

3 files changed

+0
-15
lines changed

Gemfile

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ gem 'mime-types', '~> 3.1'
2121
gem 'pg', '~> 0.18'
2222
gem 'plek'
2323
gem 'puma', '~> 3.7'
24-
gem 'rack-cors', require: 'rack/cors'
2524
gem 'rails', '~> 5.1.6'
2625
gem 'rest-client', '~> 2.0.2'
2726
gem 'rubyzip', '~> 1.2'

Gemfile.lock

-2
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ GEM
252252
rack (2.0.4)
253253
rack-cache (1.7.1)
254254
rack (>= 0.4)
255-
rack-cors (1.0.1)
256255
rack-protection (2.0.1)
257256
rack
258257
rack-test (1.0.0)
@@ -453,7 +452,6 @@ DEPENDENCIES
453452
pry-rails
454453
pry-stack_explorer (~> 0.4.9)
455454
puma (~> 3.7)
456-
rack-cors
457455
rails (~> 5.1.6)
458456
rest-client (~> 2.0.2)
459457
rspec (~> 3.6)

config/application.rb

-12
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,10 @@ class Application < Rails::Application
4040
html_tag
4141
}
4242

43-
# TODO: replace the origins wildcard to accept requets from find only?
44-
# https://github.com/cyu/rack-cors#origin
45-
config.middleware.insert_before 0, Rack::Cors do
46-
allow do
47-
origins '*'
48-
resource '*', headers: :any, methods: [:get]
49-
end
50-
end
51-
5243
config.autoload_paths += [Rails.root.join("app/workers")]
5344
config.autoload_paths += [Rails.root.join("lib/validators")]
5445
config.autoload_paths += [Rails.root.join("lib/ckan")]
5546

5647
config.elasticsearch = config_for(:elasticsearch)
57-
58-
config.filter_parameters << :password
59-
config.filter_parameters << :password_confirmation
6048
end
6149
end

0 commit comments

Comments
 (0)