Skip to content

Commit

Permalink
Disable x-powered-by header and trust first proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDogHusky committed Sep 1, 2024
1 parent 20b086a commit 929b7f1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .idea/discord.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/structures/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export default class App {
};

private initializeMiddlewares() {
this.app.disable('x-powered-by');
this.app.set('trust proxy', 1);
this.app.use(cors());
this.app.use(express.json());
this.app.use(express.urlencoded({ extended: true }));
Expand Down

0 comments on commit 929b7f1

Please sign in to comment.