cgserver 8.6.7 → 8.6.8
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.
|
@@ -8,7 +8,6 @@ const http = require("http");
|
|
|
8
8
|
const Log_1 = require("../../Logic/Log");
|
|
9
9
|
const cors = require("cors");
|
|
10
10
|
const Express = require("express");
|
|
11
|
-
const bodyParser = require("body-parser");
|
|
12
11
|
const cookieParser = require("cookie-parser");
|
|
13
12
|
class Engine {
|
|
14
13
|
_app = Express();
|
|
@@ -43,8 +42,8 @@ class Engine {
|
|
|
43
42
|
Log_1.GLog.info("Server(" + this._cfg.web_name + ") running at https://127.0.0.1:" + (port + 1) + "/");
|
|
44
43
|
}
|
|
45
44
|
this._app.use(cookieParser());
|
|
46
|
-
this._app.use(
|
|
47
|
-
this._app.use(
|
|
45
|
+
this._app.use(Express.json({ limit: '10mb' }));
|
|
46
|
+
this._app.use(Express.urlencoded({ limit: '10mb', extended: false }));
|
|
48
47
|
//处理跨域
|
|
49
48
|
if (this._cfg.cors) {
|
|
50
49
|
let origin = this._cfg.cors.origin || "*";
|