inflearn logo
Khóa học

Khóa học

Chia sẻ kiến thức

Bài viết của Jason

Jason Jason

@blue3197

Số lượng đánh giá đã viết
6
Xếp hạng trung bình
4.5

Bài viết 1

Hỏi & Đáp

실행오류

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()) }

Lượt thích
1
Số bình luận
3
Lượt xem
1651