forked from x/ContextOS
fix cookie bug
This commit is contained in:
parent
9b3fa9020c
commit
121f016ebd
2
Makefile
2
Makefile
@ -8,7 +8,7 @@ install:
|
||||
@go get github.com/gomarkdown/markdown
|
||||
go install $(BENCH)
|
||||
@date
|
||||
bench web.code.counter nmake 1
|
||||
# bench web.code.counter nmake 1
|
||||
|
||||
install_all: install
|
||||
touch etc/local.shy
|
||||
|
@ -19,8 +19,8 @@ func sysinfo(m *ctx.Message, c *ctx.Context, key string, arg ...string) {
|
||||
m.Append("uptime", d)
|
||||
m.Append("procs", sys.Procs)
|
||||
|
||||
m.Append("total", kit.FmtSize(sys.Totalram))
|
||||
m.Append("free", kit.FmtSize(sys.Freeram))
|
||||
m.Append("total", kit.FmtSize(uint64(sys.Totalram)))
|
||||
m.Append("free", kit.FmtSize(uint64(sys.Freeram)))
|
||||
m.Append("mper", fmt.Sprintf("%d%%", sys.Freeram*100/sys.Totalram))
|
||||
|
||||
fs := &syscall.Statfs_t{}
|
||||
|
@ -725,7 +725,7 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
|
||||
login = m.Spawn().Cmd("session").Appendv("login").(*ctx.Message)
|
||||
}
|
||||
if login != nil {
|
||||
http.SetCookie(w, &http.Cookie{Name: "sessid", Value: login.Cap("sessid")})
|
||||
http.SetCookie(w, &http.Cookie{Name: "sessid", Value: login.Cap("sessid"), Path: "/"})
|
||||
}
|
||||
|
||||
if !right && login != nil {
|
||||
|
@ -108,11 +108,7 @@ function onaction(event, action) {
|
||||
}
|
||||
break
|
||||
case "command":
|
||||
send_command(event.target.form, function() {
|
||||
if (event.target.value == "login") {
|
||||
location.reload()
|
||||
}
|
||||
})
|
||||
send_command(event.target.form, function() {})
|
||||
break
|
||||
case "input":
|
||||
switch (event.key) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user