serve frontend from rails through protected route

This commit is contained in:
Bilal
2020-05-21 18:14:15 +02:00
parent aaa857a6e7
commit 5dbd2ec95d
5 changed files with 22 additions and 1 deletions

View File

@@ -6,7 +6,12 @@ Rails.application.routes.draw do
get 'cash'
end
end
end
root to: 'application#frontend_index_html'
get '*path', to: 'application#frontend_index_html', constraints: lambda { |request|
!request.xhr? && request.format.html?
}
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end