鉴权完成,并修复小程序接口拦截器问题

This commit is contained in:
aixianling
2023-01-13 17:57:46 +08:00
parent 9c26e09326
commit 5594dc2378
8 changed files with 107 additions and 16 deletions

View File

@@ -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',
}
}