(event: WebSocketEvent)
| 77 | return { url: snapshot.url, headers: snapshot.headers } |
| 78 | } |
| 79 | const redactEvent = (event: WebSocketEvent) => { |
| 80 | if (event.kind === "binary") return event |
| 81 | const body = |
| 82 | event.direction === "client" |
| 83 | ? redactor.request({ method: "WEBSOCKET", url: "", headers: {}, body: event.body }).body |
| 84 | : redactor.response({ status: 101, headers: {}, body: event.body }).body |
| 85 | return { ...event, body } |
| 86 | } |
| 87 | |
| 88 | if (mode === "passthrough") return options.live |
| 89 |
no test coverage detected