To mitigate security risks by restricting unsafe HTTP methods while allowing only required methods for AutomationEdge.
Disable unnecessary HTTP methods such as:
Note: AutomationEdge requires GET, POST, PUT, DELETE, so these should remain enabled.
<Tomcat_Home>/conf/web.xml
Add the following before the closing </web-app> tag:
<security-constraint>
<web-resource-collection>
<web-resource-name>Forbidden Methods</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>OPTIONS</http-method>
<http-method>TRACE</http-method>
<http-method>TRACK</http-method>
<http-method>HEAD</http-method>
<http-method>PATCH</http-method>
</web-resource-collection>
<auth-constraint />
</security-constraint>
curl -X OPTIONS http://<host>:<port>
👉 Expected:
Ensure below still work: