mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
a little re-arranging
This commit is contained in:
parent
e463968ec5
commit
d8f1eb0bb7
1 changed files with 4 additions and 4 deletions
8
app.rb
8
app.rb
|
@ -8,6 +8,10 @@ use Rack::Session::Cookie, key: 'neocities',
|
|||
use Rack::Recaptcha, public_key: $config['recaptcha_public_key'], private_key: $config['recaptcha_private_key']
|
||||
helpers Rack::Recaptcha::Helpers
|
||||
|
||||
before do
|
||||
redirect '/' if request.post? && !csrf_safe?
|
||||
end
|
||||
|
||||
get '/?' do
|
||||
dashboard_if_signed_in
|
||||
slim :index
|
||||
|
@ -205,10 +209,6 @@ get '/privacy' do
|
|||
slim :'privacy'
|
||||
end
|
||||
|
||||
before do
|
||||
redirect '/' if request.post? && !csrf_safe?
|
||||
end
|
||||
|
||||
def dashboard_if_signed_in
|
||||
redirect '/dashboard' if signed_in?
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue