Tomcat下的配置
下载cors-filter-1.7.jar,java-property-utils-1.9.jar这两个库文件,放到lib目录下。(可在
http://search.maven.org上查询并下载。)工程项目中web.xml中的配置如下:
[html] view plaincopy在CODE上查看代码片派生到我的代码片
CORS
com.thetransactioncompany.cors.CORSFilter
cors.allowOrigin
*
cors.supportedMethods
GET, POST, HEAD, PUT, DELETE
cors.supportedHeaders
Accept, Origin, X-Requested-With, Content-Type, Last-Modified
cors.exposedHeaders
Set-Cookie
cors.supportsCredentials
true
CORS
/*
2019-12-21 22:26:50
28KB
CORS
1