mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-26 01:04:06 +08:00
vps mod some
This commit is contained in:
parent
8e7af6fa85
commit
9f199dda29
@ -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.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)
|
msg.Put("option", "request", r).Put("option", "response", w)
|
||||||
hand(msg, msg.Target(), msg.Option("path"))
|
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) { // {{{
|
func (web *WEB) ServeHTTP(w http.ResponseWriter, r *http.Request) { // {{{
|
||||||
m := web.Message()
|
m := web.Message().Log("info", "").Log("info", "%v %s %s", r.RemoteAddr, r.Method, r.URL)
|
||||||
// .Log("info", "").Log("info", "%v %s %s", r.RemoteAddr, r.Method, r.URL)
|
|
||||||
//
|
|
||||||
if m.Confs("logheaders") {
|
if m.Confs("logheaders") {
|
||||||
for k, v := range r.Header {
|
for k, v := range r.Header {
|
||||||
m.Log("info", "%s: %v", k, v)
|
m.Log("info", "%s: %v", k, v)
|
||||||
@ -884,7 +883,7 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心",
|
|||||||
m.Option("username", m.Append("username"))
|
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) {
|
if check := m.Spawn(c).Cmd("/check", "command", "/index/", "dir", dir); !check.Results(0) {
|
||||||
m.Copy(check, "append")
|
m.Copy(check, "append")
|
||||||
return
|
return
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
var canvas = document.getElementById("heart");
|
var canvas = document.getElementById("heart");//{{{
|
||||||
var ctx = canvas.getContext('2d');
|
var ctx = canvas.getContext('2d');
|
||||||
|
|
||||||
var main_angle = 30;
|
var main_angle = 30;
|
||||||
@ -74,7 +74,7 @@ var demo3 = document.getElementById("demo3");
|
|||||||
var ctx3 = demo3.getContext("2d");
|
var ctx3 = demo3.getContext("2d");
|
||||||
demo3.onclick = draw3;
|
demo3.onclick = draw3;
|
||||||
draw3()
|
draw3()
|
||||||
|
//}}}
|
||||||
|
|
||||||
var current_ctx = {//{{{
|
var current_ctx = {//{{{
|
||||||
big_scale: 1.25,
|
big_scale: 1.25,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user