Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
211 changes: 0 additions & 211 deletions src/auth/service/auth.service.spec.ts

This file was deleted.

13 changes: 7 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import { NestFactory } from '@nestjs/core';
import { NestExpressApplication } from '@nestjs/platform-express'; // [1] 타입 추가
import { AppModule } from './app.module';
import { ValidationPipe } from '@nestjs/common';
import cookieParser from 'cookie-parser';

async function bootstrap() {
const app = await NestFactory.create(AppModule);

const app = await NestFactory.create<NestExpressApplication>(AppModule);
app.set('trust proxy', 1); // 프록스 설정
app.use(cookieParser());

app.useGlobalPipes(
new ValidationPipe({
whitelist: true, // DTO에 없는 속성 제거
forbidNonWhitelisted: true, // DTO에 없는 속성 → 에러
whitelist: true,
forbidNonWhitelisted: true,
transform: true,
}),
);
Expand All @@ -22,8 +23,8 @@ async function bootstrap() {

if (
!origin ||
(typeof origin === 'string' &&
(allowedOrigins.includes(origin) || origin.endsWith('.vercel.app')))
allowedOrigins.includes(origin) ||
(typeof origin === 'string' && origin.endsWith('.vercel.app'))
) {
callback(null, true);
} else {
Expand Down