From 40333dc520d65f0ea57d65ae83a3f677c0bdaa2b Mon Sep 17 00:00:00 2001 From: Makyen Date: Thu, 7 Dec 2023 12:54:33 -0800 Subject: [PATCH] Turn off SSL verification for flagging. --- app/models/user.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 479aa0aa..8ad8196a 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -181,7 +181,8 @@ def flag(flag_type, post, dry_run = false, **opts) site: site.api_parameter, post_id: post_id, post_type: post_type[0..-2] - }) + }, + verify_peer: false) return false, "[beta] /autoflag/options #{r.code}\n#{r.headers}\n#{r.body}" if r.code != 200 response = JSON.parse(r.body) @@ -231,7 +232,8 @@ def flag(flag_type, post, dry_run = false, **opts) post_type: post_type[0..-2], flag_option_id: flag_option_id, comment: comment - }) + }, + verify_peer: false) return false, "[beta] /autoflag #{req.code}\n#{req.headers}\n#{req.body}" if req.code != 200 flag_response = JSON.parse(req.body)