Fixed issue with upload doctype

This commit is contained in:
2026-02-17 08:52:26 -07:00
parent 241ff16bb4
commit 3b37646b6d
2 changed files with 21 additions and 2 deletions

View File

@@ -108,7 +108,11 @@ app.use(cors({
origin: CORS_ORIGINS,
credentials: true
}));
app.use(express.json({ limit: '1mb' }));
// Only parse JSON for requests with application/json content type
app.use(express.json({
limit: '1mb',
type: 'application/json'
}));
app.use(cookieParser());
app.use('/uploads', express.static('uploads', {
dotfiles: 'deny',