rl-core-api 0.15.0 → 0.15.1
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.
|
@@ -15,6 +15,7 @@ const winston_config_1 = require("../logger/winston.config");
|
|
|
15
15
|
const bootstrapCore = async (appModule, options = {}) => {
|
|
16
16
|
const app = await core_1.NestFactory.create(appModule, {
|
|
17
17
|
logger: (0, winston_config_1.createAppLogger)(),
|
|
18
|
+
bodyParser: false,
|
|
18
19
|
});
|
|
19
20
|
const env = app.get(env_service_1.EnvService);
|
|
20
21
|
const logger = new common_1.Logger("Bootstrap");
|
|
@@ -24,6 +25,10 @@ const bootstrapCore = async (appModule, options = {}) => {
|
|
|
24
25
|
app.enableVersioning({ type: common_1.VersioningType.URI, defaultVersion: "1" });
|
|
25
26
|
app.use((0, helmet_1.default)({ contentSecurityPolicy: false }));
|
|
26
27
|
app.use((0, cookie_parser_1.default)());
|
|
28
|
+
app.useBodyParser("json");
|
|
29
|
+
if (options.bodyParser === "all") {
|
|
30
|
+
app.useBodyParser("urlencoded", { extended: true });
|
|
31
|
+
}
|
|
27
32
|
app.useStaticAssets((0, path_1.join)(process.cwd(), options.uploadsDir ?? "uploads"), {
|
|
28
33
|
prefix: "/uploads/",
|
|
29
34
|
setHeaders: (res) => {
|
package/package.json
CHANGED