mirror of
https://github.com/System-End/cdn.git
synced 2026-04-19 15:18:15 +00:00
redirects
This commit is contained in:
parent
bfb165d882
commit
56687e4fc1
3 changed files with 5 additions and 1 deletions
1
Gemfile
1
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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue