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

上一篇:AutoMapper: Mapper.Initialize() 只能调用一次,Why?


下一篇:Android系统的启动