Skip to content

OnUpgrade

OnUpgrade(): MethodDecorator

Defined in: src/decorators/websocket.ts:73

Decorator for WebSocket upgrade validation handler. Return false to reject the upgrade.

MethodDecorator

@OnUpgrade()
handleUpgrade(ctx: ShokupanContext) {
if (!ctx.get("authorization")) return false;
return true;
}