forked from x/icebergs
add some
This commit is contained in:
parent
131858f4b1
commit
d30b4e2034
@ -184,6 +184,10 @@ func _serve_handle(key string, cmd *ice.Command, m *ice.Message, w http.Response
|
|||||||
kit.If(strings.TrimPrefix(r.URL.Path, key), func(p string) { m.Optionv(ice.MSG_CMDS, strings.Split(p, nfs.PS)) })
|
kit.If(strings.TrimPrefix(r.URL.Path, key), func(p string) { m.Optionv(ice.MSG_CMDS, strings.Split(p, nfs.PS)) })
|
||||||
})
|
})
|
||||||
UserHost(m)
|
UserHost(m)
|
||||||
|
for k, v := range m.R.Header {
|
||||||
|
m.Info("what %v %v", k, v)
|
||||||
|
kit.If(strings.HasPrefix(k, "Wechatpay"), func() { m.Option(k, v) })
|
||||||
|
}
|
||||||
m.W.Header().Add(strings.ReplaceAll(ice.LOG_TRACEID, ".", "-"), m.Option(ice.LOG_TRACEID))
|
m.W.Header().Add(strings.ReplaceAll(ice.LOG_TRACEID, ".", "-"), m.Option(ice.LOG_TRACEID))
|
||||||
defer func() { Render(m, m.Option(ice.MSG_OUTPUT), kit.List(m.Optionv(ice.MSG_ARGS))...) }()
|
defer func() { Render(m, m.Option(ice.MSG_OUTPUT), kit.List(m.Optionv(ice.MSG_ARGS))...) }()
|
||||||
if cmds, ok := _serve_auth(m, key, kit.Simple(m.Optionv(ice.MSG_CMDS)), w, r); ok {
|
if cmds, ok := _serve_auth(m, key, kit.Simple(m.Optionv(ice.MSG_CMDS)), w, r); ok {
|
||||||
|
@ -51,7 +51,7 @@ func init() {
|
|||||||
if m.Option(ice.MSG_USERPOD, arg[0]); len(arg) == 1 {
|
if m.Option(ice.MSG_USERPOD, arg[0]); len(arg) == 1 {
|
||||||
m.Cmdy(web.SPACE, arg[0], web.SPACE, ice.MAIN)
|
m.Cmdy(web.SPACE, arg[0], web.SPACE, ice.MAIN)
|
||||||
} else if kit.IsIn(arg[1], CMD, "c") {
|
} else if kit.IsIn(arg[1], CMD, "c") {
|
||||||
if kit.IsIn(arg[2], web.ADMIN) {
|
if m.R.Method == "POST" || kit.IsIn(arg[2], web.ADMIN) {
|
||||||
m.Cmdy(web.SPACE, arg[0], arg[2], arg[3:])
|
m.Cmdy(web.SPACE, arg[0], arg[2], arg[3:])
|
||||||
} else {
|
} else {
|
||||||
m.Options(msg.AppendSimple()).Options(mdb.ICONS, "")
|
m.Options(msg.AppendSimple()).Options(mdb.ICONS, "")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user