From 18f5b3f98b932b7c07507381fa8a80a84d075f07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20B=C3=B6sche?= Date: Mon, 12 Jan 2026 16:46:11 +0100 Subject: [PATCH] Fix: Use form POST submission for Collabora (not GET query string) - Collabora requires POST request to /loleaflet/dist/loleaflet.html - WOPISrc must be in request body as form parameter - Form targets iframe by name for proper document loading - Matches WOPI/Collabora standard integration pattern --- go_cloud/internal/http/wopi_handlers.go | 27 ++++++++++++++++--------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/go_cloud/internal/http/wopi_handlers.go b/go_cloud/internal/http/wopi_handlers.go index 930cd58..92ad87c 100644 --- a/go_cloud/internal/http/wopi_handlers.go +++ b/go_cloud/internal/http/wopi_handlers.go @@ -5,7 +5,6 @@ import ( "fmt" "io" "net/http" - "net/url" "strings" "sync" "time" @@ -664,14 +663,13 @@ func collaboraProxyHandler(w http.ResponseWriter, r *http.Request, db *database. // Build WOPISrc URL wopiSrc := fmt.Sprintf("https://go.b0esche.cloud/wopi/files/%s?access_token=%s", fileID, accessToken) - // Build Collabora editor URL with WOPISrc in query string - collaboraEditorURL := fmt.Sprintf("%s/loleaflet/dist/loleaflet.html?WOPISrc=%s", collaboraURL, url.QueryEscape(wopiSrc)) - // Return HTML page with auto-submitting form + // Collabora requires: POST to /loleaflet/dist/loleaflet.html with WOPISrc in request body htmlContent := fmt.Sprintf(` Loading Document... +