verify captcha only when captcha keys present
This commit is contained in:
@@ -7,4 +7,9 @@ class ApplicationController < ActionController::Base
|
||||
# Prevent CSRF attacks by raising an exception.
|
||||
# For APIs, you may want to use :null_session instead.
|
||||
protect_from_forgery with: :exception
|
||||
|
||||
def verify_captcha?(resource)
|
||||
return true unless recaptcha_keys?
|
||||
verify_recaptcha(model: resource)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user