testing hcaptcha for contact form

This commit is contained in:
Kyle Drake 2020-11-25 18:54:04 -06:00
parent a2a46d406e
commit 79cdd06b19
8 changed files with 20 additions and 4 deletions

4
app.rb
View file

@ -11,6 +11,8 @@ use Rack::Session::Cookie, key: 'neocities',
use Rack::TempfileReaper
include Hcaptcha::Adapters::ControllerMethods
helpers do
def site_change_file_display_class(filename)
return 'html' if filename.match(Site::HTML_REGEX)
@ -21,6 +23,8 @@ helpers do
def csrf_token_input_html
%{<input name="csrf_token" type="hidden" value="#{csrf_token}">}
end
include Hcaptcha::Adapters::ViewMethods
end
set :protection, :frame_options => "DENY"