mirror of
https://github.com/coder/code-server.git
synced 2026-05-05 12:05:18 +02:00
refactor: make ensureAuthenticated async
This commit is contained in:
@@ -74,14 +74,14 @@ router.all("*", async (req, res, next) => {
|
||||
|
||||
export const wsRouter = WsRouter()
|
||||
|
||||
wsRouter.ws("*", (req, _, next) => {
|
||||
wsRouter.ws("*", async (req, _, next) => {
|
||||
const port = maybeProxy(req)
|
||||
if (!port) {
|
||||
return next()
|
||||
}
|
||||
|
||||
// Must be authenticated to use the proxy.
|
||||
ensureAuthenticated(req)
|
||||
await ensureAuthenticated(req)
|
||||
|
||||
proxy.ws(req, req.ws, req.head, {
|
||||
ignorePath: true,
|
||||
|
||||
Reference in New Issue
Block a user