Provide WsRouter to plugins

This commit is contained in:
Asher
2021-01-20 14:11:08 -06:00
parent fb37473e72
commit 055e0ef9ec
8 changed files with 101 additions and 34 deletions

View File

@ -1,11 +1,11 @@
import { Request, Response } from "express"
import * as path from "path"
import qs from "qs"
import * as pluginapi from "../../../typings/pluginapi"
import { HttpCode, HttpError } from "../../common/http"
import { normalize } from "../../common/util"
import { authenticated, ensureAuthenticated, redirect } from "../http"
import { proxy as _proxy } from "../proxy"
import { WebsocketRequest } from "../wsRouter"
const getProxyTarget = (req: Request, passthroughPath?: boolean): string => {
if (passthroughPath) {
@ -46,7 +46,7 @@ export function proxy(
}
export function wsProxy(
req: WebsocketRequest,
req: pluginapi.WebsocketRequest,
opts?: {
passthroughPath?: boolean
},