diff --git a/Gemfile b/Gemfile index 47480c4..3e942ee 100644 --- a/Gemfile +++ b/Gemfile @@ -60,6 +60,7 @@ gem "phlex-rails" gem "omniauth" gem "omniauth-hack_club" gem "faraday" +gem "faraday-follow_redirects" gem "pundit" gem "primer_view_components" gem "pg_search" diff --git a/Gemfile.lock b/Gemfile.lock index 357bea0..d7cb5c1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -149,6 +149,8 @@ GEM faraday-net_http (>= 2.0, < 3.5) json logger + faraday-follow_redirects (0.5.0) + faraday (>= 1, < 3) faraday-mashify (1.0.2) faraday (~> 2.0) hashie @@ -512,6 +514,7 @@ DEPENDENCIES debug dotenv-rails faraday + faraday-follow_redirects hashid-rails high_voltage jb diff --git a/app/models/upload.rb b/app/models/upload.rb index 021f8e8..8d96df6 100644 --- a/app/models/upload.rb +++ b/app/models/upload.rb @@ -68,7 +68,7 @@ class Upload < ApplicationRecord # Create upload from URL (for API/rescue operations) def self.create_from_url(url, user:, provenance:, original_url: nil, authorization: nil, filename: nil) conn = Faraday.new(ssl: { verify: true, verify_mode: OpenSSL::SSL::VERIFY_PEER }) do |f| - # f.response :follow_redirects, limit: 5 + f.response :follow_redirects, limit: 5 f.adapter Faraday.default_adapter end # Disable CRL checking which fails on some servers