redirects

This commit is contained in:
24c02 2026-02-05 12:26:29 -05:00
parent bfb165d882
commit 56687e4fc1
3 changed files with 5 additions and 1 deletions

View file

@ -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"

View file

@ -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

View file

@ -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