Skip to content

Commit 8da7fb3

Browse files
authored
Allow non-strict JSON (#86)
1 parent 5eb8542 commit 8da7fb3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/server.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ if (process.env["UPLOAD_BLOCKS"] === "true") {
2121
}
2222

2323
export const app = express();
24-
app.use(bodyParser.json());
24+
app.use(
25+
bodyParser.json({
26+
// Allows parsing of JSON-encoded strings, as opposed to just arrays/objects
27+
strict: false,
28+
}),
29+
);
2530

2631
// Register tsoa routes
2732
RegisterRoutes(app);

0 commit comments

Comments
 (0)