forked from treehouse/mastodon
Fix non-GET requests to / not being matched (#11704)
parent
18e37bee16
commit
8ee4a2892c
|
@ -6,6 +6,8 @@ require 'sidekiq-scheduler/web'
|
||||||
Sidekiq::Web.set :session_secret, Rails.application.secrets[:secret_key_base]
|
Sidekiq::Web.set :session_secret, Rails.application.secrets[:secret_key_base]
|
||||||
|
|
||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
|
root 'home#index'
|
||||||
|
|
||||||
mount LetterOpenerWeb::Engine, at: 'letter_opener' if Rails.env.development?
|
mount LetterOpenerWeb::Engine, at: 'letter_opener' if Rails.env.development?
|
||||||
|
|
||||||
authenticate :user, lambda { |u| u.admin? } do
|
authenticate :user, lambda { |u| u.admin? } do
|
||||||
|
@ -429,10 +431,6 @@ Rails.application.routes.draw do
|
||||||
get '/about/blocks', to: 'about#blocks'
|
get '/about/blocks', to: 'about#blocks'
|
||||||
get '/terms', to: 'about#terms'
|
get '/terms', to: 'about#terms'
|
||||||
|
|
||||||
root 'home#index'
|
match '/', via: [:post, :put, :patch, :delete], to: 'application#raise_not_found', format: false
|
||||||
|
match '*unmatched_route', via: :all, to: 'application#raise_not_found', format: false
|
||||||
match '*unmatched_route',
|
|
||||||
via: :all,
|
|
||||||
to: 'application#raise_not_found',
|
|
||||||
format: false
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue