feat: 优化开发环境配置

This commit is contained in:
kuaifan
2025-10-11 10:42:49 +00:00
parent a8d2d6f13f
commit 9b2731607b
3 changed files with 59 additions and 2 deletions

View File

@@ -61,7 +61,7 @@ class IndexController extends InvokeController
$array = Base::json2array(file_get_contents($hotFile));
$style = null;
$script = preg_replace("/^(\/\/(.*?))(:\d+)?\//i", "$1:" . $array['APP_DEV_PORT'] . "/", asset_main("resources/assets/js/app.js"));
$proxyUri = env('VSCODE_PROXY_URI');
$proxyUri = Base::liveEnv('VSCODE_PROXY_URI');
if (is_string($proxyUri) && preg_match('/^https?:\/\//i', $proxyUri)) {
$script = preg_replace('/^(https?:\/\/|\/\/)[^\/]+/', rtrim($proxyUri, '/'), $script, 1);
}