Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
15242d89
Commit
15242d89
authored
Nov 04, 2014
by
astaxie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simple the session init
parent
76522d43
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
16 deletions
+0
-16
admin.go
admin.go
+0
-2
beego.go
beego.go
+0
-2
config.go
config.go
+0
-12
No files found.
admin.go
View file @
15242d89
...
...
@@ -113,8 +113,6 @@ func listConf(rw http.ResponseWriter, r *http.Request) {
m
[
"SessionName"
]
=
SessionName
m
[
"SessionGCMaxLifetime"
]
=
SessionGCMaxLifetime
m
[
"SessionSavePath"
]
=
SessionSavePath
m
[
"SessionHashFunc"
]
=
SessionHashFunc
m
[
"SessionHashKey"
]
=
SessionHashKey
m
[
"SessionCookieLifeTime"
]
=
SessionCookieLifeTime
m
[
"UseFcgi"
]
=
UseFcgi
m
[
"MaxMemory"
]
=
MaxMemory
...
...
beego.go
View file @
15242d89
...
...
@@ -383,8 +383,6 @@ func initBeforeHttpRun() {
`"gclifetime":`
+
strconv
.
FormatInt
(
SessionGCMaxLifetime
,
10
)
+
`,`
+
`"providerConfig":"`
+
filepath
.
ToSlash
(
SessionSavePath
)
+
`",`
+
`"secure":`
+
strconv
.
FormatBool
(
EnableHttpTLS
)
+
`,`
+
`"sessionIDHashFunc":"`
+
SessionHashFunc
+
`",`
+
`"sessionIDHashKey":"`
+
SessionHashKey
+
`",`
+
`"enableSetCookie":`
+
strconv
.
FormatBool
(
SessionAutoSetCookie
)
+
`,`
+
`"domain":"`
+
SessionDomain
+
`",`
+
`"cookieLifeTime":`
+
strconv
.
Itoa
(
SessionCookieLifeTime
)
+
`}`
...
...
config.go
View file @
15242d89
...
...
@@ -56,8 +56,6 @@ var (
SessionName
string
// the cookie name when saving session id into cookie.
SessionGCMaxLifetime
int64
// session gc time for auto cleaning expired session.
SessionSavePath
string
// if use mysql/redis/file provider, define save path to connection info.
SessionHashFunc
string
// session hash generation func.
SessionHashKey
string
// session hash salt string.
SessionCookieLifeTime
int
// the life time of session id in cookie.
SessionAutoSetCookie
bool
// auto setcookie
SessionDomain
string
// the cookie domain default is empty
...
...
@@ -237,8 +235,6 @@ func init() {
SessionName
=
"beegosessionID"
SessionGCMaxLifetime
=
3600
SessionSavePath
=
""
SessionHashFunc
=
"sha1"
SessionHashKey
=
"beegoserversessionkey"
SessionCookieLifeTime
=
0
//set cookie default is the brower life
SessionAutoSetCookie
=
true
...
...
@@ -354,14 +350,6 @@ func ParseConfig() (err error) {
SessionSavePath
=
sesssavepath
}
if
sesshashfunc
:=
AppConfig
.
String
(
"SessionHashFunc"
);
sesshashfunc
!=
""
{
SessionHashFunc
=
sesshashfunc
}
if
sesshashkey
:=
AppConfig
.
String
(
"SessionHashKey"
);
sesshashkey
!=
""
{
SessionHashKey
=
sesshashkey
}
if
sessMaxLifeTime
,
err
:=
AppConfig
.
Int64
(
"SessionGCMaxLifetime"
);
err
==
nil
&&
sessMaxLifeTime
!=
0
{
SessionGCMaxLifetime
=
sessMaxLifeTime
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment