Skip to content

Commit

Permalink
fix: add helmet on queue to improve security
Browse files Browse the repository at this point in the history
  • Loading branch information
loicguillois committed Nov 22, 2024
1 parent 036a573 commit 1f999d8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions queue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"dotenv": "^16.4.5",
"exceljs": "^4.4.0",
"express": "^4.21.0",
"helmet": "^8.0.0",
"http-auth": "^4.2.0",
"parse-redis-url-simple": "^1.0.2"
},
Expand Down
4 changes: 3 additions & 1 deletion queue/src/server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import express from 'express';
import helmet from 'helmet';
import util from 'node:util';

import {
Expand All @@ -14,7 +15,8 @@ import { createBasicAuth } from './basic-auth';

function createServer() {
const app = express();

app.use(helmet());

const logger = createLogger('queue');
app.set('trust proxy', 1);

Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10663,6 +10663,7 @@ __metadata:
dotenv: "npm:^16.4.5"
exceljs: "npm:^4.4.0"
express: "npm:^4.21.0"
helmet: "npm:^8.0.0"
http-auth: "npm:^4.2.0"
jest: "npm:^29.7.0"
jest-extended: "npm:^4.0.2"
Expand Down Expand Up @@ -17639,6 +17640,13 @@ __metadata:
languageName: node
linkType: hard

"helmet@npm:^8.0.0":
version: 8.0.0
resolution: "helmet@npm:8.0.0"
checksum: 10c0/c3d273df206cbb4e5e830ea68afdbd3d0f8e055b2707f67f651ebb4b679c7fd4d6ac77ce6188a2cee32e853d4e24aa00548f787989bbe6e5f98ebfb703855d09
languageName: node
linkType: hard

"help-me@npm:^5.0.0":
version: 5.0.0
resolution: "help-me@npm:5.0.0"
Expand Down

0 comments on commit 1f999d8

Please sign in to comment.