调试:本地测试不加密
This commit is contained in:
@@ -31,6 +31,14 @@ module.exports = options => {
|
|||||||
const encodeStr = aesEncrypt(JSON.stringify(reqBody), ENCRYPT_KEY, ENCRYPT_IV);
|
const encodeStr = aesEncrypt(JSON.stringify(reqBody), ENCRYPT_KEY, ENCRYPT_IV);
|
||||||
console.log(`encoded str: ${encodeStr}`);
|
console.log(`encoded str: ${encodeStr}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(ctx.app.config.decodeParm)
|
||||||
|
if(ctx.app.config.decodeParm == false) {
|
||||||
|
await next();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!reqBody.data) return;
|
if (!reqBody.data) return;
|
||||||
|
|
||||||
const decodeStr = aesDecrypt(reqBody.data, ENCRYPT_KEY, ENCRYPT_IV);
|
const decodeStr = aesDecrypt(reqBody.data, ENCRYPT_KEY, ENCRYPT_IV);
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ export default (appInfo: EggAppInfo) => {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config.decodeParm = true;
|
||||||
|
|
||||||
config.static = {
|
config.static = {
|
||||||
prefix: '/',
|
prefix: '/',
|
||||||
dir: path.join(appInfo.baseDir, '/app/public'),
|
dir: path.join(appInfo.baseDir, '/app/public'),
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ export default (appInfo: EggAppInfo) => {
|
|||||||
'.html': 'nunjucks' //左边写成.html后缀,会自动渲染.html文件
|
'.html': 'nunjucks' //左边写成.html后缀,会自动渲染.html文件
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config.decodeParm = true;
|
||||||
|
|
||||||
config.static = {
|
config.static = {
|
||||||
prefix: '/',
|
prefix: '/',
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ export default (appInfo: EggAppInfo) => {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config.decodeParm = false;
|
||||||
|
|
||||||
config.static = {
|
config.static = {
|
||||||
prefix: '/',
|
prefix: '/',
|
||||||
dir: path.join(appInfo.baseDir, '/app/public'),
|
dir: path.join(appInfo.baseDir, '/app/public'),
|
||||||
|
|||||||
Reference in New Issue
Block a user