mirror of
https://github.com/coder/code-server.git
synced 2026-05-24 13:17:28 +02:00
Fix /vscode route being shadowed by / (#4522)
This causes / to always take precedence and on the VS Code side we would see /vscode instead of / so the matching does not work correctly.
This commit is contained in:
@@ -141,7 +141,7 @@ export const register = async (app: App, args: DefaultedArgs): Promise<Disposabl
|
|||||||
const vsServerRouteHandler = new CodeServerRouteWrapper()
|
const vsServerRouteHandler = new CodeServerRouteWrapper()
|
||||||
|
|
||||||
// Note that the root route is replaced in Coder Enterprise by the plugin API.
|
// Note that the root route is replaced in Coder Enterprise by the plugin API.
|
||||||
for (const routePrefix of ["/", "/vscode"]) {
|
for (const routePrefix of ["/vscode", "/"]) {
|
||||||
app.router.use(routePrefix, vsServerRouteHandler.router)
|
app.router.use(routePrefix, vsServerRouteHandler.router)
|
||||||
app.wsRouter.use(routePrefix, vsServerRouteHandler.wsRouter)
|
app.wsRouter.use(routePrefix, vsServerRouteHandler.wsRouter)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user