Skip to content

Instantly share code, notes, and snippets.

@mxstbr mxstbr/size-limiting.js Secret
Created Feb 20, 2018

What would you like to do?
app.use('*', (req, res, next) => {
const query = req.query.query || req.body.query || '';
if (query.length > 2000) {
throw new Error('Query too large');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.