Skip to content

Commit

Permalink
trust proxy on
Browse files Browse the repository at this point in the history
  • Loading branch information
bahram1249 committed Feb 27, 2024
1 parent 114fa71 commit d3a12a2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions apps/main/src/routes/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,12 @@ export class AppModule implements NestModule {
private readonly config: ConfigService,
) {}
app: NestExpressApplication;
async configure(consumer: MiddlewareConsumer) {
consumer
.apply(ChobokanRealIpMiddleware)
.forRoutes({ path: '/*', method: RequestMethod.ALL });
}
async configure(consumer: MiddlewareConsumer) {}
public async setApp(app: NestExpressApplication) {
this.app = app;

app.set('trust proxy', true);

app.useLogger(this.logger);
app.enableVersioning({
type: VersioningType.URI,
Expand Down

0 comments on commit d3a12a2

Please sign in to comment.