@waline/vercel 1.26.2 → 1.26.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/src/extend/think.js +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@waline/vercel",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.3",
|
|
4
4
|
"description": "vercel server for waline comment system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"waline",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@koa/cors": "4.0.0",
|
|
20
20
|
"akismet": "2.0.7",
|
|
21
21
|
"deta": "1.1.0",
|
|
22
|
-
"dompurify": "
|
|
22
|
+
"dompurify": "3.0.0",
|
|
23
23
|
"dy-node-ip2region": "1.0.1",
|
|
24
24
|
"fast-csv": "4.3.6",
|
|
25
25
|
"form-data": "4.0.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"markdown-it-sub": "1.0.0",
|
|
33
33
|
"markdown-it-sup": "1.0.0",
|
|
34
34
|
"mathjax-full": "3.2.2",
|
|
35
|
-
"node-fetch": "2.6.
|
|
35
|
+
"node-fetch": "2.6.9",
|
|
36
36
|
"nodemailer": "6.9.1",
|
|
37
37
|
"nunjucks": "3.2.3",
|
|
38
38
|
"phpass": "0.1.1",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"think-model-mysql": "1.1.7",
|
|
45
45
|
"think-model-mysql2": "^2.0.0",
|
|
46
46
|
"think-model-postgresql": "1.1.7",
|
|
47
|
-
"think-model-sqlite": "1.3.
|
|
47
|
+
"think-model-sqlite": "1.3.1",
|
|
48
48
|
"think-mongo": "2.2.1",
|
|
49
49
|
"think-router-rest": "1.0.5",
|
|
50
50
|
"thinkjs": "3.2.14",
|
package/src/extend/think.js
CHANGED
|
@@ -2,7 +2,7 @@ const ip2region = require('dy-node-ip2region');
|
|
|
2
2
|
const helper = require('think-helper');
|
|
3
3
|
const preventMessage = 'PREVENT_NEXT_PROCESS';
|
|
4
4
|
|
|
5
|
-
const regionSearch = ip2region.create();
|
|
5
|
+
const regionSearch = ip2region.create(process.env.IP2REGION_DB);
|
|
6
6
|
|
|
7
7
|
module.exports = {
|
|
8
8
|
prevent() {
|
|
@@ -70,7 +70,9 @@ module.exports = {
|
|
|
70
70
|
}
|
|
71
71
|
const { region } = result;
|
|
72
72
|
const [, , province, city, isp] = region.split('|');
|
|
73
|
-
const address = Array.from(
|
|
73
|
+
const address = Array.from(
|
|
74
|
+
new Set([province, city, isp].filter((v) => v))
|
|
75
|
+
);
|
|
74
76
|
|
|
75
77
|
return address.slice(0, depth).join(' ');
|
|
76
78
|
} catch (e) {
|