首页 > Web开发 > 详细

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

时间:2021-09-15 17:20:10      阅读:29      评论:0      收藏:0      [点我收藏+]

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!