tracking-exposed/trex

[yt:backend] Allow for bigger requests

Opened this issue · 0 comments

Some requests are rejected as they are too large 😢

PayloadTooLargeError: request entity too large
    at readStream (/app/node_modules/raw-body/index.js:156:17)
    at getRawBody (/app/node_modules/raw-body/index.js:109:12)
    at read (/app/node_modules/body-parser/lib/read.js:79:3)
    at jsonParser (/app/node_modules/body-parser/lib/types/json.js:135:5)
    at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/app/node_modules/express/lib/router/index.js:328:13)
    at /app/node_modules/express/lib/router/index.js:286:9
    at Function.process_params (/app/node_modules/express/lib/router/index.js:346:12)
    at next (/app/node_modules/express/lib/router/index.js:280:10)
    at cors (/app/node_modules/cors/lib/index.js:188:7)

It looks like the limit is set @ 10mb

app.use(bodyParser.json({ limit: '10mb' }));

I'd extend it to ~100MB, if that's possible (the number comes from the requests we've received so far), but we can discuss about that