blob: 923e1471ce26ad9136e6177582c28509593730bd [file] [log] [blame]
#include "processing.hpp"
#include <boost/algorithm/string/predicate.hpp>
bool getWellKnown(
const boost::container::flat_map<std::string, std::string>& owners,
const std::string& request, std::string& wellKnown)
{
// If it's already a well known name, just return
if (!boost::starts_with(request, ":"))
{
wellKnown = request;
return true;
}
auto it = owners.find(request);
if (it == owners.end())
{
return false;
}
wellKnown = it->second;
return true;
}