DefinitelyTyped/types/hpp/hpp-tests.ts

18 lines
291 B
TypeScript

import express = require('express');
import hpp = require('hpp');
const app = express();
app.use(hpp());
app.use(hpp({
checkBody: true,
checkBodyOnlyForContentType: 'urlencoded',
checkQuery: true,
whitelist: ['foo', 'bar']
}));
app.use(hpp({
whitelist: 'foobar'
}));