send unknown routes to the react router

This commit is contained in:
Bilal
2020-09-04 09:26:12 +03:00
parent c80ad45133
commit 20f3159dd8

View File

@@ -13,5 +13,7 @@ class StaticController < ActionController::API
def frontend_static
full_path = "protected_public/#{params[:path]}.#{params[:format]}"
send_file full_path
rescue ActionController::MissingFile
render file: 'protected_public/index.html'
end
end