Guards
Guards
웹 소켓 guards와 regular guards에는 차이가 없습니다. 알아야 할 유일한 것은 HttpException
을 발생시키는 대신 WsException
을 사용해야 한다는 것입니다.
info 힌트
WsException
클래스는@nestjs/websockets
패키지에서 노출됩니다.
Binding guards
다음은 method-scoped guard를 사용하는 예제입니다 (class-scoped도 작동합니다).
Last updated