Phill Pover 84ad2b7684
All checks were successful
Anatid Blog CI Workflow / test (./backend) (push) Successful in 27s
Anatid Blog CI Workflow / test (./frontend) (push) Successful in 31s
Anatid Blog CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/anatid-blog-backend, ./backend) (push) Successful in 52s
Anatid Blog CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/anatid-blog-frontend, ./frontend) (push) Successful in 44s
Anatid Blog CI Workflow / deploy (push) Successful in 21s
Update backend/src/main.ts
Another go at cors
2025-03-28 15:38:57 +00:00

17 lines
482 B
TypeScript

import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.enableCors({
origin: ['https://blog.anatid.net'],
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
credentials: true,
allowedHeaders: 'X-Requested-With, X-HTTP-Method-Override, Content-Type, Accept, Observe', // Allowed headers
});
await app.listen(process.env.PORT ?? 3000);
}
bootstrap();