mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
feat(sandbox): route host-shell surfaces into microVM via shell wrapper
This commit is contained in:
1 parent
ae117d6a78
commit
f315dda3f3
11 files changed
+244
-11
No files matched your search
@@ -17,7 +17,12 @@ function stripSandboxProxyApiPrefix(pathname: string): string {
|
||||
return pathname
|
||||
}
|
||||
|
||||
function isAmbiguousSandboxProxyPath(pathname: string): boolean {
|
||||
return pathname !== '/' && (pathname.includes('//') || pathname.endsWith('/'))
|
||||
}
|
||||
|
||||
function canonicalizeSandboxProxyPath(pathname: string): string | null {
|
||||
if (isAmbiguousSandboxProxyPath(pathname)) return null
|
||||
if (!pathname.includes('%')) return stripSandboxProxyApiPrefix(pathname)
|
||||
if (ENCODED_PATH_HAZARD.test(pathname)) return null
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user