Reducing information disclosure in Tomcat error pages

前端 未结 5 1385
灰色年华
灰色年华 2021-02-05 15:20

By default, Tomcat\'s error pages disclose both the existence of Tomcat and the exact version of the container that\'s handling the requests. This is nice for development, but

5条回答
  •  梦如初夏
    2021-02-05 15:36

    is the right answer, but you don't want to just redirect all error codes to some generic message. You have to think about how you want to handle each error. If you're afraid you might miss one of the codes, check out the constants in the HttpServletResponse interface.

提交回复
热议问题