[Libreoffice-commits] online.git: loolwsd/FileServer.hpp

Andras Timar andras.timar at collabora.com
Sun Jun 5 14:42:23 UTC 2016


 loolwsd/FileServer.hpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7e625d5f423f9e6dff825f4fe12d7ac464de6cd6
Author: Andras Timar <andras.timar at collabora.com>
Date:   Sun Jun 5 16:37:49 2016 +0200

    loolwsd: respect server_name setting

diff --git a/loolwsd/FileServer.hpp b/loolwsd/FileServer.hpp
index da09978..f7462b2 100644
--- a/loolwsd/FileServer.hpp
+++ b/loolwsd/FileServer.hpp
@@ -217,7 +217,7 @@ private:
     {
         HTMLForm form(request, request.stream());
 
-        const auto host = (LOOLWSD::SSLEnabled? "wss://": "ws://") + request.getHost();
+        const auto host = (LOOLWSD::SSLEnabled ? "wss://" : "ws://") + (LOOLWSD::ServerName.empty() ? request.getHost() : LOOLWSD::ServerName);
         const auto path = Poco::Path(LOOLWSD::FileServerRoot, getRequestPathname(request));
 
         Log::debug("Preprocessing file: " + path.toString());


More information about the Libreoffice-commits mailing list