[fix] Ignore server side URL parameters as Catalogue of Currencies is using them for client decisions

This commit is contained in:
Peter Sykora 2019-01-11 20:04:01 +01:00
parent e1892fe4a6
commit 1bed9e84b0

View File

@ -333,8 +333,14 @@ template<
}
// Build the path to the requested file
std::string path = path_cat(doc_root, req.target());
if (req.target().back() == '/')
boost::beast::string_view targetPath = req.target();
auto pos = targetPath.find_first_of('?');
if (pos != std::string::npos)
{
targetPath = targetPath.substr(0, pos);
}
std::string path = path_cat(doc_root, targetPath);
if (targetPath.back() == '/')
path.append("index.htm");
// Attempt to open the file