Disabling Unused HTTP Verbs

Disabling Unused HTTP Verbs

It's a good idea to disable all unused HTTP verbs so they can't be used by intruders.

In the default JasperReports Server installation, the following HTTP verbs are not used, but they are allowed. To make it easier to disable the verbs, they're listed in a single block of code in <js-webapp>/WEB-INF/web.xml. As in the code immediately above, the URL pattern /* applies the security constraint to all access to the server, including web service requests.

The list is commented out by default because it has not been exhaustively tested with all system configurations and platforms.

After uncommenting the security constraint, your final code should be like the following:

<!-- This constraint disables the listed HTTP methods, which are not used by JS -->