Commit 26fdf7bc by luyt

delete:去除跨域配置,nginx已做处理

1 parent 08cfcf40
...@@ -18,18 +18,18 @@ module.exports = appInfo => { ...@@ -18,18 +18,18 @@ module.exports = appInfo => {
domainWhiteList: [ '*' ] domainWhiteList: [ '*' ]
// domainWhiteList: ["http://localhost:8080", "http://192.168.2.9:8080","http://glsk-front.test.glsx.com.cn",] //允许访问接口的白名单 // domainWhiteList: ["http://localhost:8080", "http://192.168.2.9:8080","http://glsk-front.test.glsx.com.cn",] //允许访问接口的白名单
}; };
config.cors = { // config.cors = {
// 任何地址都可以访问 // // 任何地址都可以访问
// origin: ctx => ctx.get('origin'), //这种方式是允许所有的IP+端口跨域访问 // // origin: ctx => ctx.get('origin'), //这种方式是允许所有的IP+端口跨域访问
// 任何地址都可以访问 // // 任何地址都可以访问
origin:"*", // origin:"*",
// 指定地址才可以访问 // // 指定地址才可以访问
// origin: 'http://localhost:8080', // // origin: 'http://localhost:8080',
// allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS', // // allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS',
allowMethods: '*', // allowMethods: '*',
// cookie跨域配置 // // cookie跨域配置
credentials: true, // credentials: true,
}; // };
return config return config
} }
\ No newline at end of file \ No newline at end of file
...@@ -3,10 +3,10 @@ module.exports = { ...@@ -3,10 +3,10 @@ module.exports = {
enable: true, enable: true,
package: 'egg-sequelize', package: 'egg-sequelize',
}, },
cors:{ // cors:{
enable: true, // enable: true,
package: 'egg-cors', // package: 'egg-cors',
} // }
} }
// exports.sequelize = { // exports.sequelize = {
// enable: true, // enable: true,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!