1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-04-25 16:58:06 +08:00

vps mod some

This commit is contained in:
shylinux 2018-09-01 10:32:43 +08:00
parent 8e7af6fa85
commit 9f199dda29
2 changed files with 6 additions and 7 deletions

View File

@ -102,7 +102,7 @@ func (web *WEB) Trans(m *ctx.Message, key string, hand func(*ctx.Message, *ctx.C
msg.Add("option", k, v)
}
// msg.Log("cmd", "%s [] %v", key, msg.Meta["option"])
msg.Log("cmd", "%s [] %v", key, msg.Meta["option"])
msg.Put("option", "request", r).Put("option", "response", w)
hand(msg, msg.Target(), msg.Option("path"))
@ -125,9 +125,8 @@ func (web *WEB) Trans(m *ctx.Message, key string, hand func(*ctx.Message, *ctx.C
// }}}
func (web *WEB) ServeHTTP(w http.ResponseWriter, r *http.Request) { // {{{
m := web.Message()
// .Log("info", "").Log("info", "%v %s %s", r.RemoteAddr, r.Method, r.URL)
//
m := web.Message().Log("info", "").Log("info", "%v %s %s", r.RemoteAddr, r.Method, r.URL)
if m.Confs("logheaders") {
for k, v := range r.Header {
m.Log("info", "%s: %v", k, v)
@ -884,7 +883,7 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
m.Option("username", m.Append("username"))
//权限检查
dir := m.Option("dir", path.Join(m.Cap("directory"), m.Option("username"), m.Option("dir", strings.TrimPrefix(m.Option("path"), "/index"))))
dir := m.Option("dir", path.Join(m.Cap("directory"), "local", m.Option("username"), m.Option("dir", strings.TrimPrefix(m.Option("path"), "/index"))))
if check := m.Spawn(c).Cmd("/check", "command", "/index/", "dir", dir); !check.Results(0) {
m.Copy(check, "append")
return

View File

@ -1,4 +1,4 @@
var canvas = document.getElementById("heart");
var canvas = document.getElementById("heart");//{{{
var ctx = canvas.getContext('2d');
var main_angle = 30;
@ -74,7 +74,7 @@ var demo3 = document.getElementById("demo3");
var ctx3 = demo3.getContext("2d");
demo3.onclick = draw3;
draw3()
//}}}
var current_ctx = {//{{{
big_scale: 1.25,