diff --git a/hub/mixins.py b/hub/mixins.py index 7dea9caf4..f60ad0d6c 100644 --- a/hub/mixins.py +++ b/hub/mixins.py @@ -215,8 +215,9 @@ def data(self, as_dict=False, mp_name=False): continue elif col["name"] == "url": for row in self.query(): - # TODO: How could we get the real domain in here? Can’t use request.get_host! - area_data[row.name]["URL"].append(f"https://www.localintelligencehub.com{row.get_absolute_url()}") + area_data[row.name]["URL"].append( + f"{self.request.build_absolute_uri(row.get_absolute_url())}" + ) continue dataset = col["dataset"]