Skip to content

Commit 6422a8d

Browse files
committed
Fix webview resource path
1 parent 257d9a4 commit 6422a8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node/routes/vscode.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ router.get("/vscode-remote-resource(/*)?", async (req, res) => {
9090
router.get("/webview/*", async (req, res) => {
9191
ensureAuthenticated(req)
9292
res.set("Content-Type", getMediaMime(req.path))
93-
if (/^\/vscode-resource/.test(req.path)) {
94-
return res.send(await fs.readFile(req.path.replace(/^\/vscode-resource(\/file)?/, "")))
93+
if (/^vscode-resource/.test(req.params[0])) {
94+
return res.send(await fs.readFile(req.params[0].replace(/^vscode-resource(\/file)?/, "")))
9595
}
9696
return res.send(
9797
await fs.readFile(path.join(vscode.vsRootPath, "out/vs/workbench/contrib/webview/browser/pre", req.params[0])),

0 commit comments

Comments
 (0)