新增是否开启浏览http目录的配置选项:#367

This commit is contained in:
xiongziliang
2020-06-30 09:16:02 +08:00
parent bbcb4d41f7
commit 41c75fb66a
4 changed files with 13 additions and 0 deletions

View File

@@ -195,6 +195,11 @@ static string searchIndexFile(const string &dir){
}
static bool makeFolderMenu(const string &httpPath, const string &strFullPath, string &strRet) {
GET_CONFIG(bool, dirMenu, Http::kDirMenu);
if(!dirMenu){
//不允许浏览文件夹
return false;
}
string strPathPrefix(strFullPath);
string last_dir_name;
if(strPathPrefix.back() == '/'){