mirror of
https://github.com/coder/code-server.git
synced 2025-08-01 19:30:05 +08:00
refactor: make ensureAuthenticated async
This commit is contained in:
@ -45,13 +45,13 @@ export function proxy(
|
||||
})
|
||||
}
|
||||
|
||||
export function wsProxy(
|
||||
export async function wsProxy(
|
||||
req: pluginapi.WebsocketRequest,
|
||||
opts?: {
|
||||
passthroughPath?: boolean
|
||||
},
|
||||
): void {
|
||||
ensureAuthenticated(req)
|
||||
): Promise<void> {
|
||||
await ensureAuthenticated(req)
|
||||
_proxy.ws(req, req.ws, req.head, {
|
||||
ignorePath: true,
|
||||
target: getProxyTarget(req, opts?.passthroughPath),
|
||||
|
Reference in New Issue
Block a user