From 5a0ba04870a7fa50959082bd374b801f48311655 Mon Sep 17 00:00:00 2001 From: Noel Light-Hilary Date: Fri, 10 Nov 2023 10:26:53 +0000 Subject: [PATCH] DON-846 - import `helmet` the now-recommended way --- server.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server.ts b/server.ts index 3b1b5380c..d03ed332b 100644 --- a/server.ts +++ b/server.ts @@ -10,7 +10,7 @@ import { createHash } from 'crypto'; import * as express from 'express'; import { Request, Response } from 'express'; import { existsSync } from 'fs'; -import * as helmet from 'helmet'; +import helmet from 'helmet'; import * as morgan from 'morgan'; import { join } from 'path'; @@ -37,7 +37,6 @@ export function app() { server.use(compression()); // Sane header defaults, e.g. remove powered by, add HSTS, stop MIME sniffing etc. // https://github.com/helmetjs/helmet#reference - // @ts-ignore -- not ideal of course. See https://github.com/helmetjs/helmet/issues/235 server.use(helmet({ contentSecurityPolicy: { directives: {