Fix viewing about page for instances with a relative url

botsin.space
Regression caused by e231afb49c
This commit is contained in:
blankie 2023-12-01 15:35:36 +11:00
parent 42ce457348
commit 2d28001412
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 2 additions and 0 deletions

View File

@ -242,6 +242,8 @@ static inline void preprocess_link(const httplib::Request& req, const std::strin
std::string cls = cls_c ? std::string(reinterpret_cast<const char*>(cls_c), cls_c_len) : "";
CurlUrl href_url;
href_url.set(CURLUPART_URL, get_origin(req));
href_url.set(CURLUPART_PATH, std::string(href_url.get(CURLUPART_PATH).get()) + req.path);
href_url.set(CURLUPART_URL, href);
CurlUrl instance_url_base;
instance_url_base.set(CURLUPART_SCHEME, "https");