fix: 🐛 fix upload limit not working correctly

This commit is contained in:
Maxime Cannoodt 2022-08-10 09:27:30 +02:00
parent dfc3b81466
commit 062ecf406f
2 changed files with 2 additions and 1 deletions

View File

@ -10,7 +10,7 @@ import { cleanExpiredNotes, cleanInterval } from "./tasks/deleteExpiredNotes";
export const app: Express = express();
// Enable JSON body parsing
app.use(express.json({ limit: "500k" }));
app.use(express.json({}));
// configure logging
app.use(

View File

@ -21,6 +21,7 @@ const getRateLimit = rateLimit({
legacyHeaders: false, // Disable the `X-RateLimit-*` headers
});
// notesRoute.use(jsonParser, uploadLimit);
notesRoute.use(jsonParser);
notesRoute.post("", postRateLimit, postNoteController);
notesRoute.get("/:id", getRateLimit, getNoteController);