1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 13:20:55 +00:00

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

This commit is contained in:
astaxie 2013-12-18 23:23:00 +08:00
parent b346617dc1
commit bc0d4ac7cb

View File

@ -13,23 +13,23 @@ import (
) )
var ( var (
BeeApp *App BeeApp *App
AppName string AppName string
AppPath string AppPath string
AppConfigPath string AppConfigPath string
StaticDir map[string]string StaticDir map[string]string
TemplateCache map[string]*template.Template TemplateCache map[string]*template.Template
StaticExtensionsToGzip []string //Files which should also be compressed with gzip (.js, .css, etc) StaticExtensionsToGzip []string //Files which should also be compressed with gzip (.js, .css, etc)
HttpAddr string HttpAddr string
HttpPort int HttpPort int
HttpTLS bool HttpTLS bool
HttpCertFile string HttpCertFile string
HttpKeyFile string HttpKeyFile string
RecoverPanic bool RecoverPanic bool
AutoRender bool AutoRender bool
ViewsPath string ViewsPath string
RunMode string //"dev" or "prod" RunMode string //"dev" or "prod"
AppConfig config.ConfigContainer AppConfig config.ConfigContainer
//related to session //related to session
GlobalSessions *session.Manager //GlobalSessions GlobalSessions *session.Manager //GlobalSessions
SessionOn bool // whether auto start session,default is false SessionOn bool // whether auto start session,default is false
@ -69,7 +69,7 @@ func init() {
StaticDir = make(map[string]string) StaticDir = make(map[string]string)
StaticDir["/static"] = "static" StaticDir["/static"] = "static"
StaticExtensionsToGzip = []string{".css", ".js"} StaticExtensionsToGzip = []string{".css", ".js"}
TemplateCache = make(map[string]*template.Template) TemplateCache = make(map[string]*template.Template)
@ -117,7 +117,7 @@ func init() {
BeegoServerName = "beegoServer" BeegoServerName = "beegoServer"
EnableAdmin = true EnableAdmin = false
AdminHttpAddr = "127.0.0.1" AdminHttpAddr = "127.0.0.1"
AdminHttpPort = 8088 AdminHttpPort = 8088
@ -276,7 +276,7 @@ func ParseConfig() (err error) {
} }
} }
} }
if sgz := AppConfig.String("StaticExtensionsToGzip"); sgz != "" { if sgz := AppConfig.String("StaticExtensionsToGzip"); sgz != "" {
extensions := strings.Split(sgz, ",") extensions := strings.Split(sgz, ",")
if len(extensions) > 0 { if len(extensions) > 0 {