We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent beacc2d commit 701ea38Copy full SHA for 701ea38
src/app.ts
@@ -2,8 +2,10 @@ import createError from 'http-errors'
2
import express, { Request, Response, NextFunction } from 'express'
3
import path from 'path'
4
import cors from 'cors'
5
+import hpp from 'hpp'
6
import helmet from 'helmet'
7
import logger from 'morgan'
8
+import requestIp from 'request-ip'
9
import bodyParser from 'body-parser'
10
import cookieParser from 'cookie-parser'
11
import indexRouter from 'routes'
@@ -31,6 +33,9 @@ app.use(bodyParser.urlencoded({ extended: false }))
31
33
app.use(cookieParser())
32
34
app.use(express.static(path.join(`${__dirname}/../`, 'public')))
35
36
+app.use(hpp())
37
+app.use(requestIp.mw())
38
+
39
app.use((req: Request, res, next) => {
40
new withState(req)
41
next()
0 commit comments