From 0ff9e79ac45774a9a7276c5c489ddb70e63c5f20 Mon Sep 17 00:00:00 2001 From: harveyshao Date: Sun, 21 Aug 2022 17:35:00 +0800 Subject: [PATCH] opt some --- base/web/serve.go | 1 - base/web/space.go | 7 ------- 2 files changed, 8 deletions(-) diff --git a/base/web/serve.go b/base/web/serve.go index d8708b59..84975971 100644 --- a/base/web/serve.go +++ b/base/web/serve.go @@ -90,7 +90,6 @@ func _serve_spide(m *ice.Message, prefix string, c *ice.Context) { } } func _serve_start(m *ice.Message) { - ice.Info.Domain = kit.Select(kit.Format("%s://%s:%s", m.Option(tcp.PROTO), kit.Select(m.Cmd(tcp.HOST).Append(aaa.IP), m.Option(tcp.HOST)), m.Option(tcp.PORT)), ice.Info.Domain) if cli.NodeInfo(m, SERVER, kit.Select(ice.Info.HostName, m.Option("nodename"))); m.Option(tcp.PORT) == tcp.RANDOM { m.Option(tcp.PORT, m.Cmdx(tcp.PORT, aaa.RIGHT)) } diff --git a/base/web/space.go b/base/web/space.go index ed1fa609..c84296ce 100644 --- a/base/web/space.go +++ b/base/web/space.go @@ -29,13 +29,6 @@ func _space_domain(m *ice.Message) (link string) { if link == "" { link = m.Option(ice.MSG_USERWEB) } - if link == "" && m.R != nil && m.R.Host != "" && !tcp.IsLocalHost(m, m.R.Host) { - if m.R.TLS == nil { - link = kit.Format("http://%s", m.R.Host) - } else { - link = kit.Format("https://%s", m.R.Host) - } - } if link == "" { link = kit.Format("http://localhost:%s", kit.Select(m.Option(tcp.PORT), m.Cmd(SERVE).Append(tcp.PORT))) }