send unknown routes to the react router
This commit is contained in:
@@ -13,5 +13,7 @@ class StaticController < ActionController::API
|
|||||||
def frontend_static
|
def frontend_static
|
||||||
full_path = "protected_public/#{params[:path]}.#{params[:format]}"
|
full_path = "protected_public/#{params[:path]}.#{params[:format]}"
|
||||||
send_file full_path
|
send_file full_path
|
||||||
|
rescue ActionController::MissingFile
|
||||||
|
render file: 'protected_public/index.html'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user