fix: update URI generation to avoid hardcoded authority

This commit is contained in:
whaffman 2025-10-29 12:11:59 +01:00
parent 3714004bad
commit 19ab6aef37

View File

@ -236,7 +236,7 @@ std::string URI::getUriForPath(const std::string &path) const
} }
Log::debug("Generating URI for path", {{"path", path},{"trimmedDir", trimmedLocation}, {"trimmedPath", trimmedPath}, {"Authority", authority_}}); Log::debug("Generating URI for path", {{"path", path},{"trimmedDir", trimmedLocation}, {"trimmedPath", trimmedPath}, {"Authority", authority_}});
std::string result = "http://" + authority_; std::string result = "http://" + authority_; //TODO this should not be hardcoded...
result = FileUtils::joinPath(result, trimmedLocation); result = FileUtils::joinPath(result, trimmedLocation);
return FileUtils::joinPath(result, trimmedPath); return FileUtils::joinPath(result, trimmedPath);
} }