Tomcat设置web 点击劫持 X-Frame-Options

Tomcat配置

在 ‘conf/web.xml’填加以下配置

<filter>
<filter-name>httpHeaderSecurity</filter-name>
<filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class>
<init-param>
<param-name>antiClickJackingOption</param-name>
<param-value>SAMEORIGIN</param-value>
</init-param>
<async-supported>true</async-supported>
</filter>
<filter-mapping>
<filter-name>httpHeaderSecurity</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>

Tomcat设置web 点击劫持 X-Frame-Options

原文:https://www.cnblogs.com/lpq21314/p/15270218.html

以上是Tomcat设置web 点击劫持 X-Frame-Options的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>