Skip to content

Commit

Permalink
Keep scheme from endpoint for requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Acconut committed Jan 9, 2024
1 parent 0f73dd6 commit e4622da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/transloadit/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ def self._hmac(key, message)
#
def api(options = {})
@api ||= case url.host
when String then RestClient::Resource.new(url.host, options)
else RestClient::Resource.new(API_ENDPOINT.host, options)
when String then RestClient::Resource.new("#{url.scheme}://#{url.host}", options)
else RestClient::Resource.new("#{API_ENDPOINT.scheme}://#{API_ENDPOINT.host}", options)
end
end

Expand Down

0 comments on commit e4622da

Please sign in to comment.