Skip to content

Commit

Permalink
Turn off SSL verification for flagging.
Browse files Browse the repository at this point in the history
  • Loading branch information
makyen committed Dec 7, 2023
1 parent a00d920 commit 40333dc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 40333dc

Please sign in to comment.