c2-http 1.0.165 → 1.0.166
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.
|
@@ -10,9 +10,9 @@ const MiddlewareQueryParams_1 = __importDefault(require("./item/MiddlewareQueryP
|
|
|
10
10
|
const MiddlewareCors_1 = __importDefault(require("./item/MiddlewareCors"));
|
|
11
11
|
class MiddlewareGlobals {
|
|
12
12
|
config(expressApplication) {
|
|
13
|
+
MiddlewareBody_1.default.config(expressApplication);
|
|
13
14
|
MiddlewareCors_1.default.config(expressApplication);
|
|
14
15
|
MiddlewareContext_1.default.config(expressApplication);
|
|
15
|
-
MiddlewareBody_1.default.config(expressApplication);
|
|
16
16
|
MiddlewareQueryParams_1.default.config(expressApplication);
|
|
17
17
|
MiddlewareLogRequest_1.default.config(expressApplication);
|
|
18
18
|
}
|
|
@@ -9,8 +9,10 @@ const c2_util_1 = require("c2-util");
|
|
|
9
9
|
class MiddlewareBody {
|
|
10
10
|
config(expressApplication) {
|
|
11
11
|
expressApplication.use(body_parser_1.default.json({ limit: "25mb" }));
|
|
12
|
-
expressApplication.use(body_parser_1.default.urlencoded({ limit: "
|
|
12
|
+
expressApplication.use(body_parser_1.default.urlencoded({ limit: "25mb", extended: true })); // Aumentar de 5mb para 25mb
|
|
13
13
|
expressApplication.use(body_parser_1.default.text({ limit: "25mb" }));
|
|
14
|
+
// Adicionar parser para tipos não especificados
|
|
15
|
+
expressApplication.use(body_parser_1.default.raw({ limit: "25mb", type: "*/*" }));
|
|
14
16
|
expressApplication.use((request, response, next) => {
|
|
15
17
|
(0, c2_util_1.log)("LOG_BODY", "Body middleware enabled");
|
|
16
18
|
if (request.body && typeof request.body === "object") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "c2-http",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.166",
|
|
4
4
|
"description": "Biblioteca Typescript para API NodeJS",
|
|
5
5
|
"repository": "https://cabralsilva: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@github.com/cabralsilva/c2-http.git",
|
|
6
6
|
"author": "Daniel Cabral <cabralconsultoriaemsoftware@gmail.com>",
|