Skip to content

Commit f8381bc

Browse files
authored
Trust Proxy Syntax Fix
1 parent 0ce5fa0 commit f8381bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import helmet from 'helmet';
88
async function bootstrap() {
99
const app = await NestFactory.create(AppModule);
1010
app.getHttpAdapter().getInstance().set('etag', false);
11+
app.getHttpAdapter().getInstance().set('trust proxy', 1);
1112

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

2424
// enable cors
2525
app.enableCors({

0 commit comments

Comments
 (0)