From 3871adf4bfa97f7dbceb8592669b404e6cd672c5 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Fri, 9 Sep 2022 11:28:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=93=E5=89=8D=E7=99=BB=E5=BD=95=E7=94=A8?= =?UTF-8?q?=E6=88=B7IP=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/auth/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/api/app/lib/controllers/auth/index.js b/api/app/lib/controllers/auth/index.js index 4a751d5..928a4c7 100644 --- a/api/app/lib/controllers/auth/index.js +++ b/api/app/lib/controllers/auth/index.js @@ -45,6 +45,7 @@ async function login (ctx, next) { let ip = // '117.90.39.49' || ctx.ip + console.log(`当前登录用户IP:${ip}`); if (ip && /^(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|[1-9])\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)$/.test(ip)) { const ipLocationRes = await ctx.app.fs.godRequest.post('ip', { query: {