From e14e6133a48435707294f6c1ca696645ee99d328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Wed, 28 Sep 2022 16:57:49 +0200 Subject: [PATCH] fix(cli): Disable `X-Powered-By: Express` Header --- packages/cli/commands/worker.ts | 2 ++ packages/cli/src/Server.ts | 1 + packages/cli/src/WebhookServer.ts | 1 + 3 files changed, 4 insertions(+) diff --git a/packages/cli/commands/worker.ts b/packages/cli/commands/worker.ts index 3c4d30d1fe8f7..4ecda5c702795 100644 --- a/packages/cli/commands/worker.ts +++ b/packages/cli/commands/worker.ts @@ -370,6 +370,8 @@ export class Worker extends Command { const port = config.getEnv('queue.health.port'); const app = express(); + app.disable('x-powered-by'); + const server = http.createServer(app); app.get( diff --git a/packages/cli/src/Server.ts b/packages/cli/src/Server.ts index d3c8042f35e50..34e6440cd9bf2 100644 --- a/packages/cli/src/Server.ts +++ b/packages/cli/src/Server.ts @@ -217,6 +217,7 @@ class App { constructor() { this.app = express(); + this.app.disable('x-powered-by'); this.endpointWebhook = config.getEnv('endpoints.webhook'); this.endpointWebhookWaiting = config.getEnv('endpoints.webhookWaiting'); diff --git a/packages/cli/src/WebhookServer.ts b/packages/cli/src/WebhookServer.ts index 465db8c94a3ea..30e35b16594af 100644 --- a/packages/cli/src/WebhookServer.ts +++ b/packages/cli/src/WebhookServer.ts @@ -193,6 +193,7 @@ class App { constructor() { this.app = express(); + this.app.disable('x-powered-by'); this.endpointWebhook = config.getEnv('endpoints.webhook'); this.endpointWebhookWaiting = config.getEnv('endpoints.webhookWaiting');