add dir list limit option

This commit is contained in:
Chris Lu
2018-07-07 02:18:47 -07:00
parent 2ad45ca04f
commit 702ff48cda
6 changed files with 38 additions and 35 deletions

View File

@@ -30,7 +30,7 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request,
}
if entry.IsDirectory() {
if fs.disableDirListing {
if fs.option.DisableDirListing {
w.WriteHeader(http.StatusMethodNotAllowed)
return
}
@@ -70,7 +70,7 @@ func (fs *FilerServer) handleSingleChunk(w http.ResponseWriter, r *http.Request,
return
}
if fs.redirectOnRead {
if fs.option.RedirectOnRead {
http.Redirect(w, r, urlString, http.StatusFound)
return
}