loleaflet/dist/framed.html | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-)
New commits: commit 2e422d8fa29b8eccfd3792bc0ea613c2cd53b1b1 Author: Tor Lillqvist <t...@collabora.com> Date: Wed Mar 28 16:06:05 2018 +0300 Add some instructions Change-Id: Ib5c1b4edc1c6290cc1165d2b8b4abd7faca8bf3f diff --git a/loleaflet/dist/framed.html b/loleaflet/dist/framed.html index f99180a09..e92e02c01 100644 --- a/loleaflet/dist/framed.html +++ b/loleaflet/dist/framed.html @@ -16,6 +16,13 @@ to loleaflet in a unocommandresult: message, and passed on to the event listener on this page, which writes it to the output field. + To test this, do 'make run', and then in your browser open the + equivalent of + http://snorken.local:9980/loleaflet/3304e9093/framed.html if the + browser is running on a different machine, or + http://localhost:9980/loleaflet/3304e9093/framed.html if running + on the same machine. + --> <html> commit d31415e89db08fff9770abb61e401d677ef4d2e9 Author: Tor Lillqvist <t...@collabora.com> Date: Wed Mar 28 16:02:15 2018 +0300 For some reason the small patch to wsd/FileServer.cpp is not needed any more At least not for me, on Safari, against online master 'make run' running on Linux. Change-Id: Idd8c4b8e5db8540b85173b9c01859cce59bfe707 diff --git a/loleaflet/dist/framed.html b/loleaflet/dist/framed.html index 2dbdebbb6..f99180a09 100644 --- a/loleaflet/dist/framed.html +++ b/loleaflet/dist/framed.html @@ -16,32 +16,6 @@ to loleaflet in a unocommandresult: message, and passed on to the event listener on this page, which writes it to the output field. - For this to work, in the trivial proof of concept case of 'make - run', the below patch is needed to the C++ code. It is probably - not necessary in a "real" WOPI-based setup where iframes are - already used and things work fine. - ---- a/wsd/FileServer.cpp -+++ b/wsd/FileServer.cpp -@@ -172,7 +172,7 @@ void FileServerRequestHandler::handleRequest(const HTTPRequest& request, Poco::M - const auto& config = Application::instance().config(); - const std::string loleafletHtml = config.getString("loleaflet_html", "loleaflet.html"); - const std::string endPoint = requestSegments[requestSegments.size() - 1]; -- if (endPoint == loleafletHtml) -+ if (endPoint == loleafletHtml || endPoint == "framed.html") - { - preprocessFile(request, message, socket); - return; -@@ -548,7 +548,7 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request, Poco:: - LOG_TRC("Denied frame ancestor: " << frameAncestor); - - cspOss << "img-src 'self' data: ;"; -- oss << "X-Frame-Options: deny\r\n"; -+ oss << "X-Frame-Options: sameorigin\r\n"; - } - - cspOss << "\r\n"; - --> <html> @@ -179,6 +153,6 @@ the hex string needs to be changed of course, to the right one as shown by 'make run'. --> - <iframe src="http://snorken.local:9980/loleaflet/94781ec6/loleaflet.html?file_path=file:///home/tml/lo/internal-online/test/data/empty.ods&NotWOPIButIframe=true" height="1000" width="1000"></iframe> + <iframe src="http://snorken.local:9980/loleaflet/3304e9093/loleaflet.html?file_path=file:///home/tml/lo/online/test/data/empty.ods&NotWOPIButIframe=true" height="1000" width="1000"></iframe> </body> </html> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits