diff --git a/Gemfile b/Gemfile index 45c38b56..855cc5d9 100644 --- a/Gemfile +++ b/Gemfile @@ -79,7 +79,7 @@ group :development, :test do gem 'selenium-webdriver', '~> 4.11' gem 'simplecov', '>= 0.22.0', require: false gem 'solr_wrapper', '~> 4.0' - gem 'webdrivers', '~> 5.2', require: false + gem 'webdrivers', '~> 5.3.0', require: false gem 'webmock' end diff --git a/Gemfile.lock b/Gemfile.lock index e7705238..7c4fc6de 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -616,10 +616,10 @@ GEM rack (>= 1.4, < 3.0) warden (1.2.9) rack (>= 2.0.9) - webdrivers (5.2.0) + webdrivers (5.3.1) nokogiri (~> 1.6) rubyzip (>= 1.3.0) - selenium-webdriver (~> 4.0) + selenium-webdriver (~> 4.0, < 4.11) webmock (3.14.0) addressable (>= 2.8.0) crack (>= 0.3.2) @@ -709,7 +709,7 @@ DEPENDENCIES uglifier unicode voight_kampff - webdrivers (~> 5.2) + webdrivers (~> 5.3.0) webmock webpacker (~> 5.4.0) whenever diff --git a/config/environments/academiccommons_prod.rb b/config/environments/academiccommons_prod.rb index 331f5015..8001e655 100644 --- a/config/environments/academiccommons_prod.rb +++ b/config/environments/academiccommons_prod.rb @@ -39,6 +39,10 @@ # Specifies the header that your server uses for sending files config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' + # Set the CUL load balancer IP as our trusted proxy so that the X-Forwarded-For value set + # by the load balancer is whitelisted for use by the request.remote_ip IP-determining mechanism. + config.action_dispatch.trusted_proxies = [IPAddr.new('128.59.241.217')] + # Reducing logging in production. config.log_level = :warn diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index d8a10bc4..86b88373 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -24,7 +24,7 @@ require 'webmock/rspec' WebMock.disable_net_connect!( allow_localhost: true, - allow: 'chromedriver.storage.googleapis.com', + allow: ['chromedriver.storage.googleapis.com', 'googlechromelabs.github.io', 'edgedl.me.gvt1.com'], net_http_connect_on_start: true )