Skip to content

Commit 6a772f5

Browse files
committed
fix: use helmet expect ct
1 parent af68ba6 commit 6a772f5

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ const conditional = require('koa-conditional-get');
1717
const cors = require('kcors');
1818
const errorHandler = require('koa-better-error-handler');
1919
const etag = require('koa-etag');
20-
const expectCt = require('koa-expect-ct');
2120
const helmet = require('koa-helmet');
2221
const json = require('koa-json');
2322
const koa404Handler = require('koa-404-handler');
@@ -129,7 +128,7 @@ class API {
129128
if (this.config.helmet) app.use(helmet(this.config.helmet));
130129

131130
// add Expect-CT header for cert transparency
132-
if (this.config.expectCT) app.use(expectCt(this.config.expectCT));
131+
if (this.config.expectCT) app.use(helmet.expectCt(this.config.expectCT));
133132

134133
// remove trailing slashes
135134
app.use(removeTrailingSlashes());

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
"koa-conditional-get": "^2.0.0",
4040
"koa-connect": "^2.0.1",
4141
"koa-etag": "^3.0.0",
42-
"koa-expect-ct": "^0.0.1",
4342
"koa-helmet": "^5.2.0",
4443
"koa-json": "^2.0.2",
4544
"koa-no-trailing-slash": "^2.1.0",

0 commit comments

Comments
 (0)