Skip to content

Commit

Permalink
Fix cors
Browse files Browse the repository at this point in the history
  • Loading branch information
mmahdigh committed Oct 22, 2023
1 parent 862ba8c commit 916dc34
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,23 @@ async function bootstrap() {
};
}
const app = await NestFactory.create(AppModule, { httpsOptions });
app.use(cors());
// app.useGlobalPipes(new ValidationPipe({ whitelist: true, transform: true }));
app.useGlobalPipes(new ValidationPipe({ transform: true }));
app.use(
cors({
credentials: true,
origin: [
'https://localhost:3001',
'https://staging.pairwise.generalmagic.io',
'https://staging.pairwise.vote/',
'https://staging.pairwise.vote',
'https://www.pairwise.vote',
'https://pairwise.vote',
'https://pairwise.vote/',
'https://www.pairwise.vote/',
],
}),
);
app.use(cookieParser());

const config = new DocumentBuilder()
Expand Down

0 comments on commit 916dc34

Please sign in to comment.