From 41b4008b74af0e83230dfcb139803135f45da9a2 Mon Sep 17 00:00:00 2001 From: yhml Date: Fri, 11 Aug 2023 10:37:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=8E=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E8=8E=B7=E5=8F=96key=E5=92=8Csecret?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.js b/src/config.js index 8e9f4d5..5595e8a 100644 --- a/src/config.js +++ b/src/config.js @@ -13,8 +13,8 @@ function truncate(q){ module.exports = { youDaoApi: 'http://openapi.youdao.com/api', getParams: function () { - var appKey = '你自己的 appKey'; - var key = ' 你自己的 secretKey';//注意:暴露appSecret,有被盗用造成损失的风险 + var appKey = process.env.key; + var key = process.env.secret; //注意:暴露appSecret,有被盗用造成损失的风险 var salt = (new Date).getTime(); var curtime = Math.round(new Date().getTime()/1000); var query = alfy.input || '苹果'; @@ -48,4 +48,4 @@ module.exports = { 'was' ] } -}; \ No newline at end of file +};