I followed this tutorial to block specific endpoints.
In some cases, you may wish to restrict access to a specific URL
D:\CS\application\WEB-INF\web.xml
(..)
<security-constraint>
<web-resource-collection>
<web-resource-name>Protected API Members</web-resource-name>
<url-pattern>/cs.exe/api/v*/members/*</url-pattern>
<http-method>GET</http-method>
</web-resource-collection>
<auth-constraint />
</security-constraint>
</web-app>
The wildcard v* doesnt't work. Only the wildcard at the end members/* works. How-To specify wildcards in the middle of the API path.
Screenshot from IIS (we migrate the App to Tomcat):
