Skip to content

Commit

Permalink
Trust Proxy Syntax Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
singhalkarun authored Jan 18, 2024
1 parent 0ce5fa0 commit f8381bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import helmet from 'helmet';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.getHttpAdapter().getInstance().set('etag', false);
app.getHttpAdapter().getInstance().set('trust proxy', 1);

const config = new DocumentBuilder()
.setTitle('e-Samwad User Service')
Expand All @@ -19,7 +20,6 @@ async function bootstrap() {
SwaggerModule.setup('swagger', app, document);
// add security headers
app.use(helmet());
app.set('trust proxy', 1);

// enable cors
app.enableCors({
Expand Down

0 comments on commit f8381bc

Please sign in to comment.