Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to load libs from url #235

Closed
jgroom33 opened this issue Mar 20, 2020 · 6 comments
Closed

unable to load libs from url #235

jgroom33 opened this issue Mar 20, 2020 · 6 comments

Comments

@jgroom33
Copy link

jgroom33 commented Mar 20, 2020

these docs suggest one of these configs should work:

  • libs.url
{
  "libraries": [
    {
      "title": {
        "main": "Ciena"
      },
      "entries": [
        {
          "id": "ciena-graphics",
          "title": {
            "main": "Graphics"
          },
          "desc": {
            "main": "Collection of Graphics for Ciena"
          },
          "libs": [
            {
              "title": {
                "main": "Graphics for Ciena"
              },
"url":"gist.githubusercontent.com/jgroom33/fb2ab4a478547ca1fc5e0c292ca08ea7/raw/135c78ba8cd82f469d88b36024864a0bfe35388a/ciena.xml"
            }
          ]
        }
      ]
    }
  ],
  "defaultCustomLibraries": ["ciena-graphics"]
}
  • defaultCustomLibraries
{
  "defaultCustomLibraries": [ 
"gist.githubusercontent.com/jgroom33/fb2ab4a478547ca1fc5e0c292ca08ea7/raw/135c78ba8cd82f469d88b36024864a0bfe35388a/ciena.xml"
  ]
}

I attempted the following modifications:

  • url encoded/not
  • with/without https
  • raw gist with/without <mxlibrary> wrapper
@md2k
Copy link

md2k commented Sep 29, 2020

Have same problem with MacOs version.

{
  "libraries": [
    {
      "title": {
        "main": "Collection"
      },
      "entries": [
        {
          "id": "test-collection",
          "title": {
            "main": "Collection"
          },
          "desc": {
            "main": "My personal collection for Draw.Io/Diagrams.net"
          },
          "libs": [
            {
              "title": {
                "main": "Azure Compute"
              },
              "prefetch": true,
              "url": "Uhttps%3A%2F%2Fraw.githubusercontent.com%2Fpacodelacruz%2Fdiagrams-net-azure-libraries%2Fmaster%2FAzure-Compute.xml"
            }
          ]
        }
      ]
    }
  ]
}

But have this strange error when Shape collection selected:
image

In a same time if i use same configuration for web app all is ok (exception only url should be w/o 'U' and decoded):
image

@stale
Copy link

stale bot commented Jan 9, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. See the FAQ for more information.

@stale stale bot added the wontfix label Jan 9, 2021
@jgroom33
Copy link
Author

a similar behavior exists in the vs-code extension: hediet/vscode-drawio#210

@davidjgraph
Copy link
Contributor

This is expected, the desktop is designed to be network isolated for security reasons, remote calls shouldn't work.

@Mikecom32
Copy link

@davidjgraph Could this be reconsidered? We have a very similar use case to the functionality @jgroom33 described in hediet/vscode-drawio#210

For what it's worth, there is other functionality inside the desktop app that accesses network resources. For instance, importing fonts via the customFonts and fontCss configuration attributes happily imports fonts from public URLs. This functionality also exists in the GUI. The client also includes a "From Template URL" button in the new diagram dialog that specifically imports from a network resource.

@davidjgraph
Copy link
Contributor

We have a CSP that controls access to specific domains. This would require all controls to be removed, we can't do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants