mirror of
https://git.tuxpa.in/a/code-server.git
synced 2024-12-27 04:35:25 +00:00
Support vscode-resource requests in webview
This commit is contained in:
parent
5944b842de
commit
bd0f1d024b
@ -437,6 +437,9 @@ export class MainServer extends Server {
|
|||||||
case "/": return this.getRoot(request, parsedUrl);
|
case "/": return this.getRoot(request, parsedUrl);
|
||||||
case "/resources": return this.getResource(requestPath);
|
case "/resources": return this.getResource(requestPath);
|
||||||
case "/webview":
|
case "/webview":
|
||||||
|
if (requestPath.indexOf("/vscode-resource") === 0) {
|
||||||
|
return this.getResource(requestPath.replace(/^\/vscode-resource/, ""));
|
||||||
|
}
|
||||||
return this.getResource(
|
return this.getResource(
|
||||||
this.rootPath,
|
this.rootPath,
|
||||||
"out/vs/workbench/contrib/webview/browser/pre",
|
"out/vs/workbench/contrib/webview/browser/pre",
|
||||||
|
Loading…
Reference in New Issue
Block a user