Skip to content

Commit

Permalink
Update main.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishan-ttpl authored Dec 19, 2024
1 parent 94dce9c commit e56c857
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@ async function bootstrap() {
const document = SwaggerModule.createDocument(app, config);
SwaggerModule.setup('api/swagger-docs', app, document);

app.enableCors(corsOptions);
app.use(helmet());

app.enableCors({
origin: ['*'],
methods: ['GET', 'POST', 'HEAD', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'],
credentials: true,
allowedHeaders: ['Content-Type', 'Authorization', 'X-Custom-Header', 'Accept', 'rbac_token','tenantid','academicyearid','deviceid' ]
});
await app.listen(configService.get('port') || 4000, () => {});
}

Expand Down

0 comments on commit e56c857

Please sign in to comment.