mirror of
https://github.com/neocities/neocities.git
synced 2025-05-20 11:19:36 +02:00
convert net::http calls to http gem
This commit is contained in:
parent
be6c4252ff
commit
ca71db54ba
2 changed files with 5 additions and 9 deletions
|
@ -108,13 +108,10 @@ def hcaptcha_valid?
|
|||
return true if ENV['RACK_ENV'] == 'test' || ENV['CI']
|
||||
return false unless params[:'h-captcha-response']
|
||||
|
||||
resp = Net::HTTP.get URI(
|
||||
'https://hcaptcha.com/siteverify?'+
|
||||
Rack::Utils.build_query(
|
||||
secret: $config['hcaptcha_secret_key'],
|
||||
response: params[:'h-captcha-response']
|
||||
)
|
||||
)
|
||||
resp = HTTP.get('https://hcaptcha.com/siteverify', params: {
|
||||
secret: $config['hcaptcha_secret_key'],
|
||||
response: params[:'h-captcha-response']
|
||||
})
|
||||
|
||||
resp = JSON.parse resp
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue