File tree 3 files changed +16
-0
lines changed
3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 48
48
"exceljs" : " ^4.2.0" ,
49
49
"express" : " ^4.17.1" ,
50
50
"express-async-handler" : " ^1.1.4" ,
51
+ "express-useragent" : " ^1.0.15" ,
51
52
"googleapis" : " ^67.1.0" ,
52
53
"handlebars" : " ^4.7.6" ,
53
54
"helmet" : " ^4.4.1" ,
98
99
"@types/dotenv" : " ^8.2.0" ,
99
100
"@types/exceljs" : " ^1.3.0" ,
100
101
"@types/express" : " ^4.17.11" ,
102
+ "@types/express-useragent" : " ^1.0.0" ,
101
103
"@types/helmet" : " ^4.0.0" ,
102
104
"@types/hpp" : " ^0.2.1" ,
103
105
"@types/http-errors" : " ^1.8.0" ,
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import logger from 'morgan'
8
8
import requestIp from 'request-ip'
9
9
import bodyParser from 'body-parser'
10
10
import cookieParser from 'cookie-parser'
11
+ import userAgent from 'express-useragent'
11
12
import indexRouter from 'routes'
12
13
import withState from 'helpers/withState'
13
14
import ExpressErrorYup from 'middlewares/ExpressErrorYup'
@@ -34,6 +35,7 @@ app.use(cookieParser())
34
35
app . use ( express . static ( path . join ( `${ __dirname } /../` , 'public' ) ) )
35
36
36
37
app . use ( hpp ( ) )
38
+ app . use ( userAgent . express ( ) )
37
39
app . use ( requestIp . mw ( ) )
38
40
39
41
app . use ( ( req : Request , res , next ) => {
Original file line number Diff line number Diff line change 1498
1498
" @types/qs" " *"
1499
1499
" @types/range-parser" " *"
1500
1500
1501
+ " @types/express-useragent@^1.0.0 " :
1502
+ version "1.0.0"
1503
+ resolved "https://registry.yarnpkg.com/@types/express-useragent/-/express-useragent-1.0.0.tgz#fd06354f1d8e73211b78a2dab263789d865b010c"
1504
+ integrity sha512-tW+MrItWXAxHdQpKxl10OaDo/AqS9oW/sXKA2dfc+mSuLj/wOMc2Thj/85r8MspVP6z+iKZw+RbSX7WgNRC7xg==
1505
+ dependencies :
1506
+ " @types/express" " *"
1507
+
1501
1508
" @types/express@*" , "@types/express@^4.17.11":
1502
1509
version "4.17.11"
1503
1510
resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.11.tgz#debe3caa6f8e5fcda96b47bd54e2f40c4ee59545"
@@ -4176,6 +4183,11 @@ express-async-handler@^1.1.4:
4176
4183
resolved "https://registry.yarnpkg.com/express-async-handler/-/express-async-handler-1.1.4.tgz#225a84908df63b35ae9df94b6f0f1af061266426"
4177
4184
integrity sha512-HdmbVF4V4w1q/iz++RV7bUxIeepTukWewiJGkoCKQMtvPF11MLTa7It9PRc/reysXXZSEyD4Pthchju+IUbMiQ==
4178
4185
4186
+ express-useragent@^1.0.15 :
4187
+ version "1.0.15"
4188
+ resolved "https://registry.yarnpkg.com/express-useragent/-/express-useragent-1.0.15.tgz#cefda5fa4904345d51d3368b117a8dd4124985d9"
4189
+ integrity sha512-eq5xMiYCYwFPoekffMjvEIk+NWdlQY9Y38OsTyl13IvA728vKT+q/CSERYWzcw93HGBJcIqMIsZC5CZGARPVdg==
4190
+
4179
4191
express@^4.17.1 :
4180
4192
version "4.17.1"
4181
4193
resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134"
You can’t perform that action at this time.
0 commit comments