Skip to content

Commit

Permalink
fix(cli): Disable X-Powered-By: Express Header (n8n-io#4224)
Browse files Browse the repository at this point in the history
  • Loading branch information
netroy authored Sep 28, 2022
1 parent b3c2153 commit 7bf3ee5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/cli/commands/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/WebhookServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 7bf3ee5

Please sign in to comment.