码迷,mamicode.com
首页 > Web开发 > 详细

apache跨域问题

时间:2016-04-08 01:15:57      阅读:338      评论:0      收藏:0      [点我收藏+]

标签:跨域

<filter>

        <filter-name>CorsFilter</filter-name>

        <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>

        <init-param>

            <param-name>cors.allowed.origins</param-name>

            <!-- <param-value>qexweb.stg</param-value> -->

            <param-value>*</param-value>

        </init-param>

        <init-param>

            <param-name>cors.allowed.methods</param-name>

            <param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>

        </init-param>

        <init-param>

            <param-name>cors.allowed.headers</param-name>

            <param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers</param-value>

        </init-param>

        <init-param>

            <param-name>cors.exposed.headers</param-name>

            <param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value>

        </init-param>

    </filter>

    <filter-mapping>

        <filter-name>CorsFilter</filter-name>

        <url-pattern>/*</url-pattern>

    </filter-mapping>


本文出自 “转发与重定向区别” 博客,请务必保留此出处http://4613050.blog.51cto.com/4603050/1761455

apache跨域问题

标签:跨域

原文地址:http://4613050.blog.51cto.com/4603050/1761455

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!