Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
bc0d4ac7
authored
2013-12-18 23:23:00 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
set admin default to false. default the admin console is shut down.
1 parent
b346617d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
config.go
config.go
View file @
bc0d4ac
...
...
@@ -13,23 +13,23 @@ import (
)
var
(
BeeApp
*
App
AppName
string
AppPath
string
AppConfigPath
string
StaticDir
map
[
string
]
string
TemplateCache
map
[
string
]
*
template
.
Template
BeeApp
*
App
AppName
string
AppPath
string
AppConfigPath
string
StaticDir
map
[
string
]
string
TemplateCache
map
[
string
]
*
template
.
Template
StaticExtensionsToGzip
[]
string
//Files which should also be compressed with gzip (.js, .css, etc)
HttpAddr
string
HttpPort
int
HttpTLS
bool
HttpCertFile
string
HttpKeyFile
string
RecoverPanic
bool
AutoRender
bool
ViewsPath
string
RunMode
string
//"dev" or "prod"
AppConfig
config
.
ConfigContainer
HttpAddr
string
HttpPort
int
HttpTLS
bool
HttpCertFile
string
HttpKeyFile
string
RecoverPanic
bool
AutoRender
bool
ViewsPath
string
RunMode
string
//"dev" or "prod"
AppConfig
config
.
ConfigContainer
//related to session
GlobalSessions
*
session
.
Manager
//GlobalSessions
SessionOn
bool
// whether auto start session,default is false
...
...
@@ -69,7 +69,7 @@ func init() {
StaticDir
=
make
(
map
[
string
]
string
)
StaticDir
[
"/static"
]
=
"static"
StaticExtensionsToGzip
=
[]
string
{
".css"
,
".js"
}
TemplateCache
=
make
(
map
[
string
]
*
template
.
Template
)
...
...
@@ -117,7 +117,7 @@ func init() {
BeegoServerName
=
"beegoServer"
EnableAdmin
=
tru
e
EnableAdmin
=
fals
e
AdminHttpAddr
=
"127.0.0.1"
AdminHttpPort
=
8088
...
...
@@ -276,7 +276,7 @@ func ParseConfig() (err error) {
}
}
}
if
sgz
:=
AppConfig
.
String
(
"StaticExtensionsToGzip"
);
sgz
!=
""
{
extensions
:=
strings
.
Split
(
sgz
,
","
)
if
len
(
extensions
)
>
0
{
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment