try
This commit is contained in:
@@ -340,8 +340,8 @@ func buildDiagramsNetURL(r *http.Request, id string, xml 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))
|
||||||
encoded := url.QueryEscape(base)
|
encoded := url.QueryEscape(base)
|
||||||
// Ask draw.io not to proxy (`proxy=0`) so it fetches directly (CORS headers are already set on /diagram).
|
// Supply both url= and #U so either proxy or direct loaders work across hosted/self-hosted variants.
|
||||||
return fmt.Sprintf("%s/?splash=0&ui=min&libs=aws4&proxy=0&url=%s", drawioBaseURL, encoded)
|
return fmt.Sprintf("%s/?splash=0&ui=min&libs=aws4&url=%s#U%s", drawioBaseURL, encoded, base)
|
||||||
}
|
}
|
||||||
|
|
||||||
func addCORS(w http.ResponseWriter) {
|
func addCORS(w http.ResponseWriter) {
|
||||||
|
|||||||
Reference in New Issue
Block a user