tomcat下CORS(跨域资源共享) 的配置
来源:互联网 发布:淘宝助理模板数据包 编辑:程序博客网 时间:2024/05/19 00:53
<
filter
>
<
filter-name
>CORS</
filter-name
>
<
filter-class
>com.thetransactioncompany.cors.CORSFilter</
filter-class
>
<
init-param
>
<
param-name
>cors.allowOrigin</
param-name
>
<
param-value
>*</
param-value
>
<!--
// 允许访问的网站,多个时用逗号分开;*代表允许所有
<param-value>http://www.baidu.con, http://www.jd.com</param-value>
-->
</
init-param
>
<
init-param
>
<
param-name
>cors.supportedMethods</
param-name
>
<
param-value
>GET, POST, HEAD, PUT, DELETE</
param-value
>
</
init-param
>
<
init-param
>
<
param-name
>cors.supportedHeaders</
param-name
>
<
param-value
>Accept, Origin, X-Requested-With, Content-Type, Last-Modified</
param-value
>
</
init-param
>
<
init-param
>
<
param-name
>cors.exposedHeaders</
param-name
>
<
param-value
>Set-Cookie</
param-value
>
</
init-param
>
<
init-param
>
<
param-name
>cors.supportsCredentials</
param-name
>
<
param-value
>true</
param-value
>
</
init-param
>
</
filter
>
<
filter-mapping
>
<
filter-name
>CORS</
filter-name
>
<
url-pattern
>/*</
url-pattern
>
</
filter-mapping
>
注:这个方法已亲测。通过
0 0
- tomcat下CORS(跨域资源共享) 的配置
- tomcat下CORS(跨域资源共享) 的配置
- CORS(跨域资源共享) 的配置
- CORS(跨域资源共享) 的配置
- CORS(跨域资源共享) 的配置
- CORS(跨域资源共享) 的配置
- CORS(跨域资源共享) 的配置
- CORS(跨域资源共享) 的配置
- 跨域资源共享(CORS)
- CORS(跨域资源共享)
- Apache中配置支持CORS(跨域资源共享)实例
- tomcat7.0配置CORS(跨域资源共享)
- tomcat7.0配置CORS(跨域资源共享)
- 跨域资源共享(CORS)
- 跨域资源共享CORS
- CORS 跨域资源共享
- 跨域资源共享 CORS
- 跨域资源共享cors
- Hibernate去重复查询
- 自动化UI测试
- RSA加密方式学习
- CDISC SDTM EC/EX domain 学习笔记 - 3
- Android AndroidManifest.xml文件的android:supportsRtl属性详解
- tomcat下CORS(跨域资源共享) 的配置
- 2016-5-11-1
- PL/SQL中如何删除没有用的sql脚本(PL/SQL中的reopen删除
- maven 3.3.3 for windows 配置
- Codeforces Round #350 (Div. 2)
- android OOBE创建方法
- 自定义控件之对现有控件拓展(一)
- ffmpeg 保存avcodec_decode_audio4解码后的PCM数据
- 将数据库查询出的数据保存到Excel表格中