tomcat解决跨域配置
tomcat解决跨域访问问题,具体配置如下:
1、修改tomcat下的Conf/web.xml文件,在该文件内容中新增以下配置,注意,若该web.xml中存在其它filter,则需要将该filter放在所有filter前面;
tomcat解决跨域访问问题,具体配置如下:
1、修改tomcat下的Conf/web.xml文件,在该文件内容中新增以下配置,注意,若该web.xml中存在其它filter,则需要将该filter放在所有filter前面;
漏洞修复建议(或缓解措施):
1.关闭Remote Debug模式。
关闭Java Debug模式进程,例如一下进程:
java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=7001,suspend=n
以下举例使用tomcat中间件关闭Remote Debug模式方法:
注释startup.sh第2行
#!/bin/bash
#declare -x CATALINA_OPTS=”-server -Xdebug -Xnoagent -Djava.compiler=NONE-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8788″
重启对应项目tomcat服务