Skip to content

Commit

Permalink
Merge pull request #1381 from thebiggive/DON-846-helmet-import
Browse files Browse the repository at this point in the history
DON-846 - import `helmet` the now-recommended way
  • Loading branch information
NoelLH authored Nov 10, 2023
2 parents 1c424ca + 5a0ba04 commit c0446bc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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: {
Expand Down

0 comments on commit c0446bc

Please sign in to comment.