|
@@ -55,6 +55,7 @@ public class CORSFilter implements Filter {
|
|
|
}
|
|
}
|
|
|
//80端口已经禁止了,服务器端也应该禁止TRACE\TRACK方法
|
|
//80端口已经禁止了,服务器端也应该禁止TRACE\TRACK方法
|
|
|
String method = httpRequest.getMethod();
|
|
String method = httpRequest.getMethod();
|
|
|
|
|
+ log.warn("method:{}",method);
|
|
|
if ("TRACE".equalsIgnoreCase(method) || "TRACK".equalsIgnoreCase(method)) {
|
|
if ("TRACE".equalsIgnoreCase(method) || "TRACK".equalsIgnoreCase(method)) {
|
|
|
response.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED);//405
|
|
response.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED);//405
|
|
|
response.getWriter().write("method TRACE/TRACK not allowed");
|
|
response.getWriter().write("method TRACE/TRACK not allowed");
|