Skip to content

Commit

Permalink
Merge pull request #162 from ckekula/Cooper-JSK-patch-5
Browse files Browse the repository at this point in the history
Update main.ts
  • Loading branch information
nostoc authored Oct 17, 2024
2 parents bab83b3 + ec9fbbb commit a6cb64b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { CorsOptions } from '@nestjs/common/interfaces/external/cors-options.int
async function bootstrap() {
const app = await NestFactory.create(AppModule);
const corsOptions: CorsOptions = {
origin: process.env.CORS_ORIGIN, // Allow only your Next.js app to access the API
origin: ['http://localhost:3000', 'https://sayido.lk'], // Allow only your Next.js app to access the API
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
credentials: true, // Allow cookies to be sent with requests
optionsSuccessStatus: 204, // Some legacy browsers choke on 204
Expand Down

0 comments on commit a6cb64b

Please sign in to comment.