hedgedoc/lib/web/utils.ts

15 lines
378 B
TypeScript
Raw Normal View History

import bodyParser from 'body-parser'
// create application/x-www-form-urlencoded parser
export const urlencodedParser = bodyParser.urlencoded({
extended: false,
limit: 1024 * 1024 * 10 // 10 mb
})
// create text/markdown parser
export const markdownParser = bodyParser.text({
inflate: true,
type: ['text/plain', 'text/markdown'],
limit: 1024 * 1024 * 10 // 10 mb
})