mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-01-20 20:01:22 +00:00
Increase body parser limit
- The default limit is only 100kb - we are getting many requests that exceed this limit - not sure about what would be an appropriate limit, but have seen 50mb in many examples.
This commit is contained in:
parent
6662f57fba
commit
00195f1615
@ -7,6 +7,7 @@ import { getNeode, getDriver } from './db/neo4j'
|
||||
import decode from './jwt/decode'
|
||||
import schema from './schema'
|
||||
import webfinger from './activitypub/routes/webfinger'
|
||||
import bodyParser from 'body-parser'
|
||||
|
||||
const driver = getDriver()
|
||||
const neode = getNeode()
|
||||
@ -45,6 +46,8 @@ const createServer = options => {
|
||||
app.use(helmet())
|
||||
app.use('/.well-known/', webfinger())
|
||||
app.use(express.static('public'))
|
||||
app.use(bodyParser.json({ limit: '50mb' }))
|
||||
app.use(bodyParser.urlencoded({ limit: '50mb', extended: true }))
|
||||
server.applyMiddleware({ app, path: '/' })
|
||||
|
||||
return { server, app }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user