Add http file types for download

This commit is contained in:
antao 2018-08-24 11:21:02 +08:00
parent 1faa4937a3
commit 5bc2929797
3 changed files with 5 additions and 2 deletions

View File

@ -119,6 +119,7 @@ int main()
//api example for std::function
drogon::HttpAppFramework::registerHttpApiMethod("/api/v1/handle4/{4}/{3}/{1}",func);
drogon::HttpAppFramework::instance().setDocumentRoot("./");
//start app framework
drogon::HttpAppFramework::instance().enableDynamicSharedLibLoading({"/tmp/views"});
drogon::HttpAppFramework::instance().run();

View File

@ -126,7 +126,9 @@ namespace drogon
std::regex _apiRegex;
bool _enableLastModify=true;
std::set<std::string> _fileTypeSet={"html","jpg"};
std::set<std::string> _fileTypeSet={"html","js","css","xml","xsl","txt","svg","ttf",
"otf","woff2","woff","eot","png","jpg","jpeg",
"gif","bmp","ico","icns"};
std::string _rootPath=".";
std::atomic_bool _running;

@ -1 +1 @@
Subproject commit 992b40e7eb2a73744f56d95882bfc3cd38cdc199
Subproject commit 46356ba273a8f7868173bd123ba1d3ced104b8d1