bc0d4ac7 by astaxie

set admin default to false. default the admin console is shut down.

1 parent b346617d
Showing 1 changed file with 19 additions and 19 deletions
...@@ -13,23 +13,23 @@ import ( ...@@ -13,23 +13,23 @@ import (
13 ) 13 )
14 14
15 var ( 15 var (
16 BeeApp *App 16 BeeApp *App
17 AppName string 17 AppName string
18 AppPath string 18 AppPath string
19 AppConfigPath string 19 AppConfigPath string
20 StaticDir map[string]string 20 StaticDir map[string]string
21 TemplateCache map[string]*template.Template 21 TemplateCache map[string]*template.Template
22 StaticExtensionsToGzip []string //Files which should also be compressed with gzip (.js, .css, etc) 22 StaticExtensionsToGzip []string //Files which should also be compressed with gzip (.js, .css, etc)
23 HttpAddr string 23 HttpAddr string
24 HttpPort int 24 HttpPort int
25 HttpTLS bool 25 HttpTLS bool
26 HttpCertFile string 26 HttpCertFile string
27 HttpKeyFile string 27 HttpKeyFile string
28 RecoverPanic bool 28 RecoverPanic bool
29 AutoRender bool 29 AutoRender bool
30 ViewsPath string 30 ViewsPath string
31 RunMode string //"dev" or "prod" 31 RunMode string //"dev" or "prod"
32 AppConfig config.ConfigContainer 32 AppConfig config.ConfigContainer
33 //related to session 33 //related to session
34 GlobalSessions *session.Manager //GlobalSessions 34 GlobalSessions *session.Manager //GlobalSessions
35 SessionOn bool // whether auto start session,default is false 35 SessionOn bool // whether auto start session,default is false
...@@ -69,7 +69,7 @@ func init() { ...@@ -69,7 +69,7 @@ func init() {
69 69
70 StaticDir = make(map[string]string) 70 StaticDir = make(map[string]string)
71 StaticDir["/static"] = "static" 71 StaticDir["/static"] = "static"
72 72
73 StaticExtensionsToGzip = []string{".css", ".js"} 73 StaticExtensionsToGzip = []string{".css", ".js"}
74 74
75 TemplateCache = make(map[string]*template.Template) 75 TemplateCache = make(map[string]*template.Template)
...@@ -117,7 +117,7 @@ func init() { ...@@ -117,7 +117,7 @@ func init() {
117 117
118 BeegoServerName = "beegoServer" 118 BeegoServerName = "beegoServer"
119 119
120 EnableAdmin = true 120 EnableAdmin = false
121 AdminHttpAddr = "127.0.0.1" 121 AdminHttpAddr = "127.0.0.1"
122 AdminHttpPort = 8088 122 AdminHttpPort = 8088
123 123
...@@ -276,7 +276,7 @@ func ParseConfig() (err error) { ...@@ -276,7 +276,7 @@ func ParseConfig() (err error) {
276 } 276 }
277 } 277 }
278 } 278 }
279 279
280 if sgz := AppConfig.String("StaticExtensionsToGzip"); sgz != "" { 280 if sgz := AppConfig.String("StaticExtensionsToGzip"); sgz != "" {
281 extensions := strings.Split(sgz, ",") 281 extensions := strings.Split(sgz, ",")
282 if len(extensions) > 0 { 282 if len(extensions) > 0 {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!