From f1c961d63e8fbd06c388e06e35cddf465e8d0c2b Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Mon, 12 Jan 2026 15:57:55 +1100 Subject: [PATCH] Tweaked the redirect URL --- cmd/server/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/server/main.go b/cmd/server/main.go index a36cace..b32ff7d 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -341,9 +341,10 @@ func buildDiagramsNetURL(r *http.Request, id string, xml string) string { base := fmt.Sprintf("%s://%s/diagram?id=%s", scheme, r.Host, url.QueryEscape(id)) // Request AWS library for custom shapes (e.g., aws4) to render correctly. // Provide both query param (url=) and fragment (#U) so different draw.io deployments can fetch the diagram. - // We intentionally avoid embedding the XML inline to keep headers small for Tomcat-based self-hosted instances. + // Use encoded form for the query parameter, but keep the fragment raw; some self-hosted builds expect #U followed by + // an unescaped URL. encodedURL := url.QueryEscape(base) - redirect := fmt.Sprintf("%s/?splash=0&ui=min&libs=aws4&url=%s#U%s", drawioBaseURL, encodedURL, encodedURL) + redirect := fmt.Sprintf("%s/?splash=0&ui=min&libs=aws4&url=%s#U%s", drawioBaseURL, encodedURL, base) _ = xml // kept for signature compatibility; may be used in future fallbacks return redirect }