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");