diff options
Diffstat (limited to 'src/helpers.cr')
| -rw-r--r-- | src/helpers.cr | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/helpers.cr b/src/helpers.cr index c253cd89..86786876 100644 --- a/src/helpers.cr +++ b/src/helpers.cr @@ -241,7 +241,14 @@ def rank_videos(db, n) return top[0..n - 1] end -def make_client(url, context) +def make_client(url) + context = OpenSSL::SSL::Context::Client.new + context.verify_mode = OpenSSL::SSL::VerifyMode::NONE + context.add_options( + OpenSSL::SSL::Options::ALL | + OpenSSL::SSL::Options::NO_SSL_V2 | + OpenSSL::SSL::Options::NO_SSL_V3 + ) client = HTTP::Client.new(url, context) client.read_timeout = 10.seconds client.connect_timeout = 10.seconds |
