Skip to content

Commit

Permalink
🎨 桌面端支持同时打开多个工作空间 #4567
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jan 6, 2023
1 parent 0c19a05 commit 483ceb7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kernel/server/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func Serve(fastMode bool) {
rewritePortJSON(pid, port)
}

logging.LogInfof("kernel [pid=%s] http server is booting [%s]", pid, "http://"+util.LocalHost+":"+port)
logging.LogInfof("kernel [pid=%s] http server [%s] is booting", pid, host+":"+port)
util.HttpServing = true

go func() {
Expand All @@ -117,8 +117,8 @@ func Serve(fastMode bool) {
// 启动一个 6806 端口的反向代理服务器,这样浏览器扩展才能直接使用 127.0.0.1:6806,不用配置端口
serverURL, _ := url.Parse("http://127.0.0.1:" + port)
proxy := httputil.NewSingleHostReverseProxy(serverURL)
logging.LogInfof("reverse proxy server is booting [%s]", "http://127.0.0.1:"+util.FixedPort)
if proxyErr := http.ListenAndServe("127.0.0.1:"+util.FixedPort, proxy); nil != proxyErr {
logging.LogInfof("reverse proxy server [%s] is booting", host+":"+util.FixedPort)
if proxyErr := http.ListenAndServe(host+":"+util.FixedPort, proxy); nil != proxyErr {
logging.LogWarnf("boot reverse proxy server [%s] failed: %s", serverURL, proxyErr)
}
// 反代服务器启动失败不影响核心服务器启动
Expand Down

0 comments on commit 483ceb7

Please sign in to comment.