-
Notifications
You must be signed in to change notification settings - Fork 2
为什么我用了 没有覆盖cors的配置呀 #2
Copy link
Copy link
Open
Description
exports.cors = {
enable: true,
package: 'egg-cors',
};
exports.origin = {
enable: true,
package: 'egg-origin',
};
config.origin = {
whiteList: [ 'http://admin.dirtypool.top', 'http://blog.dirtypool.top' ],
};
config.security = {
csrf: {
enable: false,
},
domainWhiteList: ['*'],
};
config.cors = {
// 跨域带Cookie Origin不能为*
origin: [],
credentials: true, // 允许Cookie跨域
allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS',
};
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels