mm_os 1.7.6 → 1.7.7
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.
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 应用
|
|
3
|
+
* @param {Object} server 服务
|
|
4
|
+
* @param {Object} config 配置参数
|
|
5
|
+
*/
|
|
6
|
+
module.exports = function(server, config) {
|
|
7
|
+
/* 跨域限制(web防火墙) */
|
|
8
|
+
server.use(async (ctx, next) => {
|
|
9
|
+
var url = ctx.path + ctx.querystring;
|
|
10
|
+
var body = "";
|
|
11
|
+
if (ctx.request.body) {
|
|
12
|
+
body = JSON.stringify(ctx.request.body);
|
|
13
|
+
}
|
|
14
|
+
$.log.http(`${ctx.method} ${url} ${body}`);
|
|
15
|
+
await next();
|
|
16
|
+
});
|
|
17
|
+
return server;
|
|
18
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mm_os",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.7",
|
|
4
4
|
"description": "这是超级美眉服务端框架,用于快速构建应用程序。",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"koa-websocket": "^7.0.0",
|
|
37
37
|
"mm_check": "^1.4.4",
|
|
38
38
|
"mm_excel": "^1.1.1",
|
|
39
|
-
"mm_expand": "^1.6.
|
|
39
|
+
"mm_expand": "^1.6.6",
|
|
40
40
|
"mm_html": "^1.1.1",
|
|
41
41
|
"mm_koa_proxy": "^1.0.0",
|
|
42
|
-
"mm_logs": "^1.1.
|
|
42
|
+
"mm_logs": "^1.1.2",
|
|
43
43
|
"mm_machine": "^1.6.0",
|
|
44
44
|
"mm_mongodb": "^1.3.9",
|
|
45
45
|
"mm_mqtt": "^1.0.5",
|
|
46
|
-
"mm_mysql": "^1.7.
|
|
46
|
+
"mm_mysql": "^1.7.2",
|
|
47
47
|
"mm_redis": "^1.3.9",
|
|
48
48
|
"mm_ret": "^1.3.7",
|
|
49
49
|
"mm_session": "^1.4.1",
|