个中版本应当是最新的稳定版本,CORS过滤器
- 第三步:添加CORS设备到项目标Web.xml中( App/WEB-INF/web.xml)
JSONP方法解决跨域问题
- <!-- 跨域设备-->
- <filter>
- <!-- The CORS filter with parameters -->
- <filter-name>CORS</filter-name>
- <filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>
- <!-- Note: All parameters are options, if omitted the CORS
- Filter will fall back to the respective default values.
- -->
- <init-param>
- <param-name>cors.allowGenericHttpRequests</param-name>
- <param-value>true</param-value>
- </init-param>
- <init-param>
- <param-name>cors.allowOrigin</param-name>
- <param-value>*</param-value>
- </init-param>
- <init-param>
- <param-name>cors.allowSubdomains</param-name>
- <param-value>false</param-value>
- </init-param>
- <init-param>
推荐阅读
【限时免费】岁尾最强一次云计算大年夜会,看传统、社区、互联网企业若何碰撞? 【51CTO.com原创稿件】CISQ董事长兼首席履行官Bill Curtis博士也指出,他曾几回来到中国,致力于推动国际代>>>详细阅读
本文标题:ajax跨域,这应该是最全的解决方案了
地址:http://www.17bianji.com/lsqh/39951.html
1/2 1

网友点评
精彩导读
科技快报
品牌展示