Fixing CORS
Some checks failed
Anatid Blog CI Workflow / test (./backend) (push) Failing after 28s
Anatid Blog CI Workflow / test (./frontend) (push) Successful in 29s
Anatid Blog CI Workflow / build-and-push-images (./backend/Dockerfile, git.anatid.net/tabris/anatid-blog-backend, ./backend) (push) Has been skipped
Anatid Blog CI Workflow / build-and-push-images (./frontend/Dockerfile, git.anatid.net/tabris/anatid-blog-frontend, ./frontend) (push) Has been skipped
Anatid Blog CI Workflow / deploy (push) Has been skipped

This commit is contained in:
Phill Pover 2025-03-28 10:05:40 +00:00
parent c35e9a13cb
commit 3e90deda5d
2 changed files with 5 additions and 1 deletions

View File

@ -1,7 +1,11 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
@Injectable() @Injectable()
export class AppService { export class AppService {
constructor(
private readonly configService: ConfigService
) {}
getHello(): string { getHello(): string {
return 'Hello World!'; return 'Hello World!';
} }

View File

@ -6,7 +6,7 @@ const corsOptions = {
async function bootstrap() { async function bootstrap() {
const app = await NestFactory.create(AppModule); const app = await NestFactory.create(AppModule);
app.enableCors(); app.enableCors(corsOptions);
await app.listen(process.env.PORT ?? 3000); await app.listen(process.env.PORT ?? 3000);
} }