forked from klaudgrave/discourse-google-recaptcha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin.rb
24 lines (18 loc) · 738 Bytes
/
plugin.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# name: recaptcha
# about: add Google Recaptcha to Sign Up form
# version: 0.1
# authors: klaudgrave
# url: https://github.com/klaudgrave
#gem 'recaptcha', '5.1.0'
enabled_site_setting :recaptcha_enabled
load File.expand_path('../lib/google_recaptcha.rb', __FILE__)
load File.expand_path('../services/recaptcha_verifier.rb', __FILE__)
load File.expand_path('../app/controllers/concerns/recaptcha_verifiable.rb', __FILE__)
after_initialize do
load File.expand_path('../app/controllers/recaptcha_controller.rb', __FILE__)
Discourse::Application.routes.append do
#put '/grverify' => 'recaptcha#verify'
#mount ::RecaptchaVerifiable::recaptcha, at: "/grverify"
match '/grverify' => 'recaptcha#index', :via => :post
end
end