From 5fb08d8831c26bc7d04fa67f7b9cbeba99a9d4ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20B=C3=B6sche?= Date: Mon, 12 Jan 2026 16:51:16 +0100 Subject: [PATCH] Improve Collabora proxy: add load event listener and relax iframe sandbox for form submission - Use window load event to ensure form element exists before submission - Add allow-popups-to-escape-sandbox for cross-origin form POSTs - Add allow-presentation for better compatibility - Improved error logging for debugging form submission issues --- b0esche_cloud/lib/pages/document_viewer.dart | 4 +-- go_cloud/internal/http/wopi_handlers.go | 28 ++++++++++++-------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/b0esche_cloud/lib/pages/document_viewer.dart b/b0esche_cloud/lib/pages/document_viewer.dart index b879d87..0d5ee79 100644 --- a/b0esche_cloud/lib/pages/document_viewer.dart +++ b/b0esche_cloud/lib/pages/document_viewer.dart @@ -480,11 +480,11 @@ class _DocumentViewerModalState extends State { ..src = proxyUrl ..setAttribute( 'allow', - 'microphone; camera; usb; autoplay; clipboard-read; clipboard-write', + 'microphone; camera; usb; autoplay; clipboard-read; clipboard-write; fullscreen', ) ..setAttribute( 'sandbox', - 'allow-same-origin allow-scripts allow-popups allow-forms', + 'allow-same-origin allow-scripts allow-popups allow-popups-to-escape-sandbox allow-forms allow-presentation', ); final container = html.DivElement() diff --git a/go_cloud/internal/http/wopi_handlers.go b/go_cloud/internal/http/wopi_handlers.go index 92ad87c..77699a3 100644 --- a/go_cloud/internal/http/wopi_handlers.go +++ b/go_cloud/internal/http/wopi_handlers.go @@ -683,18 +683,24 @@ func collaboraProxyHandler(w http.ResponseWriter, r *http.Request, db *database. - + `, collaboraURL, wopiSrc)