鉴权完成,并修复小程序接口拦截器问题
This commit is contained in:
@@ -22,8 +22,17 @@ module.exports = {
|
||||
},
|
||||
security: {
|
||||
csrf: {
|
||||
queryName: "token",
|
||||
ignore: ctx => ctx.headers.passport === "c799f2d92de34b97"//md5编码:kubbo&flora
|
||||
enable: false,
|
||||
ignoreJSON: true,
|
||||
}
|
||||
},
|
||||
//登录鉴权
|
||||
jwt: {
|
||||
secret: "c799f2d92de34b97"
|
||||
},
|
||||
//跨域设置
|
||||
cors: {
|
||||
origin: '*',
|
||||
allowMethods: 'GET,HEAD,POST',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
exports.mysql = {
|
||||
enable: true,
|
||||
package: 'egg-mysql'
|
||||
module.exports = {
|
||||
mysql: {
|
||||
enable: true,
|
||||
package: 'egg-mysql',
|
||||
},
|
||||
jwt: {
|
||||
enable: true,
|
||||
package: 'egg-jwt',
|
||||
},
|
||||
cors: {
|
||||
enable: true,
|
||||
package: 'egg-cors',
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user