mirror of
https://github.com/discourse/discourse.git
synced 2024-12-14 12:03:57 +08:00
12 lines
339 B
Ruby
12 lines
339 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class FastImage
|
||
|
def setup_http
|
||
|
@http = FinalDestination::HTTP.new(@parsed_uri.host, @parsed_uri.port)
|
||
|
@http.use_ssl = (@parsed_uri.scheme == "https")
|
||
|
@http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
||
|
@http.open_timeout = @options[:timeout]
|
||
|
@http.read_timeout = @options[:timeout]
|
||
|
end
|
||
|
end
|