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
c1b2e1d0
Commit
c1b2e1d0
authored
Oct 28, 2013
by
astaxie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #238
parent
9fc4cd89
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
beego.go
beego.go
+4
-0
config.go
config.go
+7
-0
No files found.
beego.go
View file @
c1b2e1d0
...
...
@@ -5,6 +5,7 @@ import (
"github.com/astaxie/beego/session"
"net/http"
"path"
"strings"
)
const
VERSION
=
"0.9.9"
...
...
@@ -36,6 +37,9 @@ func SetViewsPath(path string) *App {
}
func
SetStaticPath
(
url
string
,
path
string
)
*
App
{
if
!
strings
.
HasPrefix
(
url
,
"/"
)
{
url
=
"/"
+
url
}
StaticDir
[
url
]
=
path
return
BeeApp
}
...
...
config.go
View file @
c1b2e1d0
...
...
@@ -8,6 +8,7 @@ import (
"path"
"runtime"
"strconv"
"strings"
)
var
(
...
...
@@ -178,6 +179,12 @@ func ParseConfig() (err error) {
if
serverName
:=
AppConfig
.
String
(
"BeegoServerName"
);
serverName
!=
""
{
BeegoServerName
=
serverName
}
if
sd
:=
AppConfig
.
String
(
"StaticDir"
);
sd
!=
""
{
sds
:=
strings
.
Split
(
sd
,
","
)
for
_
,
v
:=
range
sds
{
StaticDir
[
"/"
+
v
]
=
v
}
}
}
return
nil
}
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