From b6a02f8c5e6943cbae4735c43d0f6fb3fd96ff13 Mon Sep 17 00:00:00 2001 From: waterweasel4 Date: Wed, 27 Jan 2021 10:46:27 -0500 Subject: [PATCH] fix(app.ts): cSP error fix Fixing the CSP errors by moving around helmet code fix #566 --- src/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.ts b/src/app.ts index 7e7a26d9..1fb75683 100644 --- a/src/app.ts +++ b/src/app.ts @@ -45,6 +45,7 @@ app.use( etag: false, }) ); +app.use(helmet()); app.use(bodyParser.json({ limit: '2mb' })); app.use(bodyParser.urlencoded({ extended: true })); const serverPort = process.env.PORT || 5000; @@ -56,7 +57,6 @@ app.listen(serverPort, () => console.info(`Server running on ${serverIpAddress}:${serverPort}`) ); -app.use(helmet()); app.use( helmet.contentSecurityPolicy({ directives: {