1
0
forked from x/icebergs
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-05-25 20:47:58 +08:00
parent ac151623c1
commit bd7d558208
2 changed files with 2 additions and 1 deletions

View File

@ -149,7 +149,7 @@ func RenderMain(m *ice.Message) *ice.Message {
return m.RenderDownload(path.Join(ice.USR_INTSHELL, ice.INDEX_SH)) return m.RenderDownload(path.Join(ice.USR_INTSHELL, ice.INDEX_SH))
} }
m.Options(nfs.SCRIPT, ice.SRC_MAIN_JS, nfs.VERSION, RenderVersion(m)) m.Options(nfs.SCRIPT, ice.SRC_MAIN_JS, nfs.VERSION, RenderVersion(m))
m.OptionDefault(mdb.ICONS, m.Resource(ice.Info.NodeIcon)+m.Option(nfs.VERSION)) m.OptionDefault(mdb.ICONS, strings.Split(m.Resource(ice.Info.NodeIcon), "?")[0]+m.Option(nfs.VERSION))
m.OptionDefault(TITLE, kit.Select("localhost:9020", UserWeb(m).Host, m.Option(ice.MSG_USERPOD))) m.OptionDefault(TITLE, kit.Select("localhost:9020", UserWeb(m).Host, m.Option(ice.MSG_USERPOD)))
return m.RenderResult(kit.Renders(m.Cmdx(nfs.CAT, ice.SRC_MAIN_HTML), m)) return m.RenderResult(kit.Renders(m.Cmdx(nfs.CAT, ice.SRC_MAIN_HTML), m))
} }

View File

@ -76,6 +76,7 @@ func _serve_main(m *ice.Message, w http.ResponseWriter, r *http.Request) bool {
if r.Method == http.MethodGet { if r.Method == http.MethodGet {
msg := m.Spawn(w, r).Options(ice.MSG_USERUA, r.UserAgent(), ice.LOG_TRACEID, r.Header.Get(ice.LOG_TRACEID), ParseLink(m, kit.Select(r.URL.String(), r.Referer()))) msg := m.Spawn(w, r).Options(ice.MSG_USERUA, r.UserAgent(), ice.LOG_TRACEID, r.Header.Get(ice.LOG_TRACEID), ParseLink(m, kit.Select(r.URL.String(), r.Referer())))
if path.Join(r.URL.Path) == nfs.PS { if path.Join(r.URL.Path) == nfs.PS {
msg.Options(ice.MSG_USERWEB, _serve_domain(msg))
if Render(RenderMain(msg), msg.Option(ice.MSG_OUTPUT), kit.List(msg.Optionv(ice.MSG_ARGS))...) { if Render(RenderMain(msg), msg.Option(ice.MSG_OUTPUT), kit.List(msg.Optionv(ice.MSG_ARGS))...) {
return false return false
} }