From 2d280014120afa45b818b648088c74f5197342a4 Mon Sep 17 00:00:00 2001 From: blankie Date: Fri, 1 Dec 2023 15:35:36 +1100 Subject: [PATCH] Fix viewing about page for instances with a relative url botsin.space Regression caused by e231afb49c05f2074990b474ccfcc00460bc4cd7 --- servehelper.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/servehelper.cpp b/servehelper.cpp index 1889d71..92c99df 100644 --- a/servehelper.cpp +++ b/servehelper.cpp @@ -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(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");