I have a ruby-on-rails application running locally on a WEBrick server. I am using Postman to trigger HTTP Methods (POST, GET, etc) in order to check if any error page is shown to the users. The figure below shows one of the error pages found when performing a POST to the home page:
As one can note, the physical path to the application directory is disclosed: /home/dennis/dunbarwebsite
Leaking this kind of information may help one fine-tune attacks against the application. Hence, I would like to know if it is possible to forward this error page to a custom one, like the custom redirection to errors 404 and 500.
Thanks in advance, Dennis.
routes.rb
: match "*path", to: redirect('/'), via: :all