Skip to content

Commit dd29a82

Browse files
authored
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.
1 parent cd26f84 commit dd29a82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node/routes/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export const register = async (app: App, args: DefaultedArgs): Promise<Disposabl
141141
const vsServerRouteHandler = new CodeServerRouteWrapper()
142142

143143
// Note that the root route is replaced in Coder Enterprise by the plugin API.
144-
for (const routePrefix of ["/", "/vscode"]) {
144+
for (const routePrefix of ["/vscode", "/"]) {
145145
app.router.use(routePrefix, vsServerRouteHandler.router)
146146
app.wsRouter.use(routePrefix, vsServerRouteHandler.wsRouter)
147147
}

0 commit comments

Comments
 (0)