mirror of
https://github.com/coder/code-server.git
synced 2025-07-30 21:45:08 +08:00
Provide WsRouter to plugins
This commit is contained in:
@ -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
|
||||
},
|
||||
|
Reference in New Issue
Block a user