set large limit on express server requests

This commit is contained in:
timothycarambat 2023-08-16 17:46:45 -07:00
parent 31fbb0784b
commit c283ae33a3

View File

@ -19,12 +19,14 @@ const { utilEndpoints } = require("./endpoints/utils");
const { Telemetry } = require("./models/telemetry");
const app = express();
const apiRouter = express.Router();
const FILE_LIMIT = "3GB";
app.use(cors({ origin: true }));
app.use(bodyParser.text());
app.use(bodyParser.json());
app.use(bodyParser.text({ limit: FILE_LIMIT }));
app.use(bodyParser.json({ limit: FILE_LIMIT }));
app.use(
bodyParser.urlencoded({
limit: FILE_LIMIT,
extended: true,
})
);