filer add readonly public port

This commit is contained in:
Chris Lu
2017-05-27 20:14:22 -07:00
parent 7ecc0f4b11
commit 478fe0ecf2
4 changed files with 58 additions and 35 deletions

View File

@@ -18,3 +18,12 @@ func (fs *FilerServer) filerHandler(w http.ResponseWriter, r *http.Request) {
fs.PostHandler(w, r)
}
}
func (fs *FilerServer) readonlyFilerHandler(w http.ResponseWriter, r *http.Request) {
switch r.Method {
case "GET":
fs.GetOrHeadHandler(w, r, true)
case "HEAD":
fs.GetOrHeadHandler(w, r, false)
}
}