Override Sinatra default NotFound error page

后端 未结 3 1280
后悔当初
后悔当初 2021-02-05 20:17

Is there a way to override the sinatra default NotFound error page (\"Sinatra doesnt know this ditty\")? I want sinatra to show only a plain string as \"Method not found\" when

3条回答
  •  终归单人心
    2021-02-05 21:22

    Nevermind, found that all routes are matched in order, so after all routes I put get/post/put/delete '*' do ; end and that solves my problem.

提交回复
热议问题