🎨 桌面端支持同时打开多个工作空间 https://github.com/siyuan-note/siyuan/issues/4567

This commit is contained in:
Liang Ding 2023-01-06 16:08:08 +08:00
parent 483ceb7ff7
commit aabc1d4a85
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -114,6 +114,10 @@ func Serve(fastMode bool) {
go func() {
time.Sleep(1 * time.Second)
if util.FixedPort != port {
if isPortOpen(util.FixedPort) {
return
}
// 启动一个 6806 端口的反向代理服务器,这样浏览器扩展才能直接使用 127.0.0.1:6806不用配置端口
serverURL, _ := url.Parse("http://127.0.0.1:" + port)
proxy := httputil.NewSingleHostReverseProxy(serverURL)