From 3dbfc6d96b5c01538f8d67a9fd60dc1f639b5a4c Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Mon, 12 Jan 2026 15:42:25 +1100 Subject: [PATCH] changed redirect --- cmd/server/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/server/main.go b/cmd/server/main.go index a172510..4bf1154 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -340,9 +340,11 @@ func buildDiagramsNetURL(r *http.Request, id 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 parameter and fragment (#U) so self-hosted instances that prefer #U can load the file. + // Use only the fragment form (#U) to maximize compatibility with self-hosted draw.io instances that + // expect the remote URL there. The fragment keeps the remote file URL intact and avoids the `url=` query + // parameter, which some deployments ignore. encoded := url.QueryEscape(base) - return fmt.Sprintf("%s/?splash=0&ui=min&libs=aws4&url=%s#U%s", drawioBaseURL, encoded, encoded) + return fmt.Sprintf("%s/?splash=0&ui=min&libs=aws4#U%s", drawioBaseURL, encoded) } func addCORS(w http.ResponseWriter) {