mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-13 22:40:50 +08:00
18 lines
289 B
TypeScript
18 lines
289 B
TypeScript
import * as express from 'express';
|
|
import * as hpp from 'hpp';
|
|
|
|
const app = express();
|
|
|
|
app.use(hpp());
|
|
|
|
app.use(hpp({
|
|
checkBody: true,
|
|
checkBodyOnlyForContentType: 'urlencoded',
|
|
checkQuery: true,
|
|
whitelist: ['foo', 'bar']
|
|
}));
|
|
|
|
app.use(hpp({
|
|
whitelist: 'foobar'
|
|
}));
|