์คํ์ค๋ฅ
2023-02-12 :passport ๋ฏธ๋ค์จ์ด ์ฌ์ฉ๋ณด๋ค ์์ ์ ์ด์ฃผ์
์ผ ๋์ํ์์ต๋๋ค.private async setUpGlobalMiddleware() { this.server.enableCors({ origin: this.corsOriginList, credentials: true, }) this.server.use(cookieParser()) this.setUpBasicAuth() this.setUpOpenAPIMidleware() this.server.useGlobalPipes( new ValidationPipe({ transform: true, }), ) // ์ด ๋ถ๋ถ ์ ์ฉ this.server.use( expressSession({ secret: 'SECRET', resave: true, saveUninitialized: true, }), ) // ----------------- this.server.use(passport.initialize()) this.server.use(passport.session()) this.server.useGlobalInterceptors( new ClassSerializerInterceptor(this.server.get(Reflector)), ) this.server.useGlobalFilters(new HttpApiExceptionFilter()) }