Skip to content

Commit bbc7099

Browse files
committed
refactor: make wsProxy async
1 parent fc46396 commit bbc7099

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/node/routes/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ export const register = async (
9898
app.all("/proxy/(:port)(/*)?", (req, res) => {
9999
pathProxy.proxy(req, res)
100100
})
101-
wsApp.get("/proxy/(:port)(/*)?", (req) => {
102-
pathProxy.wsProxy(req as pluginapi.WebsocketRequest)
101+
wsApp.get("/proxy/(:port)(/*)?", async (req) => {
102+
await pathProxy.wsProxy(req as pluginapi.WebsocketRequest)
103103
})
104104
// These two routes pass through the path directly.
105105
// So the proxied app must be aware it is running
@@ -109,8 +109,8 @@ export const register = async (
109109
passthroughPath: true,
110110
})
111111
})
112-
wsApp.get("/absproxy/(:port)(/*)?", (req) => {
113-
pathProxy.wsProxy(req as pluginapi.WebsocketRequest, {
112+
wsApp.get("/absproxy/(:port)(/*)?", async (req) => {
113+
await pathProxy.wsProxy(req as pluginapi.WebsocketRequest, {
114114
passthroughPath: true,
115115
})
116116
})

0 commit comments

Comments
 (0)