Skip to content

Commit

Permalink
MAT-6729: Modifying CORS check to it's specific to our servers, GET &…
Browse files Browse the repository at this point in the history
… PUT
  • Loading branch information
gregory-akins committed Apr 11, 2024
1 parent 61fed16 commit 455b489
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/auth/auth.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export class AuthGuard implements CanActivate {
throw new UnauthorizedException('Token not present');
}
try {
console.log('Token', token);
const oktaToken = await oktaJwtVerifier.verifyAccessToken(
token,
'api://default',
Expand Down
12 changes: 11 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@ import { NestFactory } from '@nestjs/core';
import { ExportModule } from './export.module';

export async function bootstrap() {
const app = await NestFactory.create(ExportModule, { cors: true });
const app = await NestFactory.create(ExportModule);
app.enableCors({
origin: [
'http://localhost:9000',
'https://dev-madie.hcqis.org',
'https://test-madie.hcqis.org',
'https://impl-madie.hcqis.org',
'https://madie.cms.gov',
],
methods: ['GET', 'PUT'],
});
await app.listen(3000);
}
bootstrap();

0 comments on commit 455b489

Please sign in to comment.