|
@@ -2,7 +2,6 @@ package engine
|
|
|
|
|
|
import (
|
|
import (
|
|
"database/sql"
|
|
"database/sql"
|
|
- "fmt"
|
|
|
|
"net/http"
|
|
"net/http"
|
|
"os"
|
|
"os"
|
|
"strings"
|
|
"strings"
|
|
@@ -32,7 +31,7 @@ func (this *Engine) Process() bool {
|
|
this.Wrap.IsBackend = this.Wrap.R.URL.Path == "/cp" || strings.HasPrefix(this.Wrap.R.URL.Path, "/cp/")
|
|
this.Wrap.IsBackend = this.Wrap.R.URL.Path == "/cp" || strings.HasPrefix(this.Wrap.R.URL.Path, "/cp/")
|
|
this.Wrap.ConfMysqlExists = utils.IsMySqlConfigExists(this.Wrap.DConfig + string(os.PathSeparator) + "mysql.json")
|
|
this.Wrap.ConfMysqlExists = utils.IsMySqlConfigExists(this.Wrap.DConfig + string(os.PathSeparator) + "mysql.json")
|
|
|
|
|
|
-
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -74,22 +73,9 @@ func (this *Engine) Process() bool {
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
+
|
|
- if this.Wrap.R.URL.Path == "/" {
|
|
+ if this.Wrap.IsBackend {
|
|
- this.Wrap.W.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
|
|
+ return this.BackEnd()
|
|
- this.Wrap.W.Header().Set("Content-Type", "text/html")
|
|
|
|
-
|
|
|
|
- counter := this.Wrap.S.GetInt("counter", 0)
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- this.Wrap.W.Write([]byte(`Logic -> (` + fmt.Sprintf("%d", counter) + `)`))
|
|
|
|
-
|
|
|
|
- counter++
|
|
|
|
- this.Wrap.S.SetInt("counter", counter)
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- return true
|
|
|
|
}
|
|
}
|
|
-
|
|
+ return this.FrontEnd()
|
|
- return false
|
|
|
|
}
|
|
}
|