未验证 提交 1134780b 编写于 作者: J Joe Previte

refactor: make wsProxy async

上级 91303d4e
...@@ -98,8 +98,8 @@ export const register = async ( ...@@ -98,8 +98,8 @@ export const register = async (
app.all("/proxy/(:port)(/*)?", (req, res) => { app.all("/proxy/(:port)(/*)?", (req, res) => {
pathProxy.proxy(req, res) pathProxy.proxy(req, res)
}) })
wsApp.get("/proxy/(:port)(/*)?", (req) => { wsApp.get("/proxy/(:port)(/*)?", async (req) => {
pathProxy.wsProxy(req as pluginapi.WebsocketRequest) await pathProxy.wsProxy(req as pluginapi.WebsocketRequest)
}) })
// These two routes pass through the path directly. // These two routes pass through the path directly.
// So the proxied app must be aware it is running // So the proxied app must be aware it is running
...@@ -109,8 +109,8 @@ export const register = async ( ...@@ -109,8 +109,8 @@ export const register = async (
passthroughPath: true, passthroughPath: true,
}) })
}) })
wsApp.get("/absproxy/(:port)(/*)?", (req) => { wsApp.get("/absproxy/(:port)(/*)?", async (req) => {
pathProxy.wsProxy(req as pluginapi.WebsocketRequest, { await pathProxy.wsProxy(req as pluginapi.WebsocketRequest, {
passthroughPath: true, passthroughPath: true,
}) })
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册