changed redirect
This commit is contained in:
@@ -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))
|
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.
|
// 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)
|
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) {
|
func addCORS(w http.ResponseWriter) {
|
||||||
|
|||||||
Reference in New Issue
Block a user