wsd/FileServer.cpp | 16 ++++++++-------- wsd/LOOLWSD.cpp | 1 + 2 files changed, 9 insertions(+), 8 deletions(-)
New commits: commit af2847e9a4d9085ba1d85144a54d505eb8fa84e7 Author: Jan Holesovsky <ke...@collabora.com> AuthorDate: Fri Sep 7 23:34:09 2018 +0200 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Mon Sep 10 23:08:32 2018 +0200 ServiceRoot: Fix the branding and update the admin console debug URL. Change-Id: Id10d7a4d99ea993a398467e528e2018cc12d503b Reviewed-on: https://gerrit.libreoffice.org/60176 Reviewed-by: Michael Meeks <michael.me...@collabora.com> Tested-by: Michael Meeks <michael.me...@collabora.com> diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp index 251dd7ce9..f1ccfecc9 100644 --- a/wsd/FileServer.cpp +++ b/wsd/FileServer.cpp @@ -616,11 +616,11 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request, Poco:: Poco::replaceInPlace(preprocess, std::string("%VERSION%"), std::string(LOOLWSD_VERSION_HASH)); Poco::replaceInPlace(preprocess, std::string("%SERVICE_ROOT%"), LOOLWSD::ServiceRoot); - static const std::string linkCSS("<link rel=\"stylesheet\" href=\"/loleaflet/" LOOLWSD_VERSION_HASH "/%s.css\">"); - static const std::string scriptJS("<script src=\"/loleaflet/" LOOLWSD_VERSION_HASH "/%s.js\"></script>"); + static const std::string linkCSS("<link rel=\"stylesheet\" href=\"%s/loleaflet/" LOOLWSD_VERSION_HASH "/%s.css\">"); + static const std::string scriptJS("<script src=\"%s/loleaflet/" LOOLWSD_VERSION_HASH "/%s.js\"></script>"); - std::string brandCSS(Poco::format(linkCSS, std::string(BRANDING))); - std::string brandJS(Poco::format(scriptJS, std::string(BRANDING))); + std::string brandCSS(Poco::format(linkCSS, LOOLWSD::ServiceRoot, std::string(BRANDING))); + std::string brandJS(Poco::format(scriptJS, LOOLWSD::ServiceRoot, std::string(BRANDING))); const auto& config = Application::instance().config(); #if ENABLE_SUPPORT_KEY @@ -628,8 +628,8 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request, Poco:: SupportKey key(keyString); if (!key.verify() || key.validDaysRemaining() <= 0) { - brandCSS = Poco::format(linkCSS, std::string(BRANDING_UNSUPPORTED)); - brandJS = Poco::format(scriptJS, std::string(BRANDING_UNSUPPORTED)); + brandCSS = Poco::format(linkCSS, LOOLWSD::ServiceRoot, std::string(BRANDING_UNSUPPORTED)); + brandJS = Poco::format(scriptJS, LOOLWSD::ServiceRoot, std::string(BRANDING_UNSUPPORTED)); } #endif @@ -789,13 +789,13 @@ void FileServerRequestHandler::preprocessAdminFile(const HTTPRequest& request,co if (!FileServerRequestHandler::isAdminLoggedIn(request, response)) throw Poco::Net::NotAuthenticatedException("Invalid admin login"); - static const std::string scriptJS("<script src=\"/loleaflet/dist/%s.js\"></script>"); + static const std::string scriptJS("<script src=\"%s/loleaflet/" LOOLWSD_VERSION_HASH "/%s.js\"></script>"); static const std::string footerPage("<div class=\"footer navbar-fixed-bottom text-info text-center\"><strong>Key:</strong> %s <strong>Expiry Date:</strong> %s</div>"); const std::string relPath = getRequestPathname(request); LOG_DBG("Preprocessing file: " << relPath); std::string adminFile = *getUncompressedFile(relPath); - std::string brandJS(Poco::format(scriptJS, std::string(BRANDING))); + std::string brandJS(Poco::format(scriptJS, LOOLWSD::ServiceRoot, std::string(BRANDING))); std::string brandFooter; #if ENABLE_SUPPORT_KEY diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 087abbd27..ecc3d4fd1 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -573,6 +573,7 @@ inline std::string getAdminURI(const Poco::Util::LayeredConfiguration &config) std::ostringstream oss; oss << getLaunchBase(user + ":" + passwd + "@"); + oss << LOOLWSD::ServiceRoot; oss << LOOLWSD_TEST_ADMIN_CONSOLE; return oss.str(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits