File tree Expand file tree Collapse file tree 3 files changed +144
-300
lines changed Expand file tree Collapse file tree 3 files changed +144
-300
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,8 @@ const _ = require('lodash');
1313const auth = require ( 'koa-basic-auth' ) ;
1414const bodyParser = require ( 'koa-bodyparser' ) ;
1515const conditional = require ( 'koa-conditional-get' ) ;
16- const cors = require ( 'kcors' ) ;
1716const errorHandler = require ( 'koa-better-error-handler' ) ;
1817const etag = require ( 'koa-etag' ) ;
19- const helmet = require ( 'koa-helmet' ) ;
2018const json = require ( 'koa-json' ) ;
2119const koa404Handler = require ( 'koa-404-handler' ) ;
2220const koaConnect = require ( 'koa-connect' ) ;
@@ -125,12 +123,6 @@ class API {
125123 // etag
126124 app . use ( etag ( ) ) ;
127125
128- // cors
129- if ( this . config . cors ) app . use ( cors ( this . config . cors ) ) ;
130-
131- // security
132- if ( this . config . helmet ) app . use ( helmet ( this . config . helmet ) ) ;
133-
134126 // remove trailing slashes
135127 app . use ( removeTrailingSlashes ( ) ) ;
136128
Original file line number Diff line number Diff line change 2323 "@koa/router" : " ^9.0.1" ,
2424 "@ladjs/i18n" : " ^3.0.12" ,
2525 "@ladjs/redis" : " ^1.0.4" ,
26- "@ladjs/shared-config" : " ^3.0.6 " ,
26+ "@ladjs/shared-config" : " ^3.0.7 " ,
2727 "@ladjs/store-ip-address" : " ^0.0.7" ,
2828 "boolean" : " 3.0.1" ,
29- "cabin" : " ^6.1.4 " ,
29+ "cabin" : " ^7.0.0 " ,
3030 "express-request-id" : " ^1.4.1" ,
31- "kcors" : " ^2.2.2" ,
3231 "koa" : " ^2.12.0" ,
3332 "koa-404-handler" : " ^0.0.2" ,
3433 "koa-basic-auth" : " ^4.0.0" ,
3938 "koa-conditional-get" : " ^2.0.0" ,
4039 "koa-connect" : " ^2.0.1" ,
4140 "koa-etag" : " ^3.0.0" ,
42- "koa-helmet" : " ^5.2.0" ,
4341 "koa-json" : " ^2.0.2" ,
4442 "koa-no-trailing-slash" : " ^2.1.0" ,
4543 "koa-simple-ratelimit" : " ^4.0.2" ,
5755 "eslint-config-xo-lass" : " ^1.0.3" ,
5856 "fixpack" : " ^3.0.6" ,
5957 "husky" : " ^4.2.5" ,
60- "lint-staged" : " 10.2.7 " ,
61- "mongoose" : " ^5.9.16 " ,
62- "nyc" : " ^15.0.1 " ,
58+ "lint-staged" : " 10.2.9 " ,
59+ "mongoose" : " ^5.9.18 " ,
60+ "nyc" : " ^15.1.0 " ,
6361 "remark-cli" : " ^8.0.0" ,
6462 "remark-preset-github" : " ^1.0.1" ,
6563 "supertest" : " ^4.0.2" ,
You can’t perform that action at this time.
0 commit comments