mirror of
https://github.com/neocities/neocities.git
synced 2025-08-03 16:21:52 +02:00
fixes for hcaptcha, add to dmca form
This commit is contained in:
parent
79cdd06b19
commit
2821f513f1
9 changed files with 32 additions and 25 deletions
9
app.rb
9
app.rb
|
@ -11,8 +11,6 @@ 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)
|
||||
|
@ -24,7 +22,12 @@ helpers do
|
|||
%{<input name="csrf_token" type="hidden" value="#{csrf_token}">}
|
||||
end
|
||||
|
||||
include Hcaptcha::Adapters::ViewMethods
|
||||
def hcaptcha_input
|
||||
%{
|
||||
<script src="https://hcaptcha.com/1/api.js" async defer></script>
|
||||
<div class="h-captcha" data-sitekey="#{$config['hcaptcha_site_key']}"></div>
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
set :protection, :frame_options => "DENY"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue