go
This commit is contained in:
parent
7f73bb3d4d
commit
c485d070a3
@ -403,10 +403,10 @@ func (h *HttpServer) Listen(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
fullpath := filepath.Join(h.envPath, path)
|
||||
if path == "/" && h.indexFile != "" {
|
||||
if staros.Exists(filepath.Join(h.envPath, h.indexFile)) {
|
||||
fullpath = filepath.Join(h.envPath, h.indexFile)
|
||||
path = "/" + h.indexFile
|
||||
if h.indexFile != "" && staros.IsFolder(fullpath) {
|
||||
if staros.Exists(filepath.Join(fullpath, h.indexFile)) {
|
||||
fullpath = filepath.Join(fullpath, h.indexFile)
|
||||
path = filepath.Join(path, h.indexFile)
|
||||
}
|
||||
}
|
||||
log.Noticef("Start Method:%s Path:%s IP:%s\n", r.Method, path, r.RemoteAddr)
|
||||
|
Loading…
x
Reference in New Issue
Block a user