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

DRAWIO_LIGHTBOX_URL config not working when self-hosted #3175

Closed
chookrib opened this issue Nov 11, 2022 · 9 comments
Closed

DRAWIO_LIGHTBOX_URL config not working when self-hosted #3175

chookrib opened this issue Nov 11, 2022 · 9 comments
Assignees

Comments

@chookrib
Copy link

Preflight Checklist

  • [ √ ] I agree to follow the Code of Conduct that this project adheres to.
  • [ √ ] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Describe the bug
I am using v20.5.3 self-hosted in domain like http://diagram.explame.com
When set DRAWIO_LIGHTBOX_URL value 'http://diagram.explame.com', the website will not working.

To Reproduce
Steps to reproduce the behavior:

  1. Set window.DRAWIO_LIGHTBOX_URL = 'http://diagram.explame.com'; in preConfig.js
  2. Open website http://diagram.explame.com
  3. The website show error, see screenshots.
  4. Remove config DRAWIO_LIGHTBOX_URL, website work correct. but Publish\Link... generate link with https://viewer.diagrams.net/.

Expected behavior
Set DRAWIO_LIGHTBOX_URL let Publish\Link... can generate with specified url.

Screenshots
2022-11-11_163731

draw.io version (In the Help->About menu of the draw.io editor):

  • v20.5.3

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome 107.0.5304.89

Additional context
I read #2149 #750 #2149 #2057, doesn't help solve the problem.

@davidjgraph
Copy link
Collaborator

Can you test again with the latest build?

@chookrib
Copy link
Author

test with 20.6.0 and 20.6.2,same problem.

@jeffshead
Copy link

jeffshead commented Dec 24, 2022

AlmaLinux 8.7, Portainer, Niginx Proxy Manager, Drawio v20.7.4
I'm experiencing the same issue.

version: '3.5'
services:
  drawio:
    image: jgraph/drawio
    container_name: drawio
    restart: unless-stopped
    environment:
      - DRAWIO_BASE_URL=https://dio.example.com
      - DRAWIO_VIEWER_URL=https://dio.example.com/js/viewer.min.js
      - DRAWIO_LIGHTBOX_URL=https://dio.example.com
    ports:
      - "127.0.0.1:8013:8080"
      - "127.0.0.1:8414:8443"

networks:
  default:
    name: npm_default
    external: true

@Fabiettus
Copy link

Is there a solution to this issue?
Drawio 20.8.20 on docker

@imshenyz
Copy link

test with 20.8.20,same problem.

@JoghurtMitDerEcke
Copy link

I had the same problem. I got it working with the following variables:

DRAWIO_BASE_URL=https://diagrams.example.com
DRAWIO_VIEWER_URL=https://diagrams.example.com/js/viewer.min.js
DRAWIO_LIGHTBOX_URL=https://diagrams.example.com/.

Note the /. at the end of the DRAWIO_LIGHTBOX_URL.

Hope it helps!

@m-mohamedin
Copy link
Contributor

The DRAWIO_LIGHTBOX_URL must be different from the main url (DRAWIO_BASE_URL) such that it opens the lightbox directly.

So, @JoghurtMitDerEcke solution is the best workaround if you can't have a different url/subdomain.

Thanks

@fvsion
Copy link

fvsion commented Nov 16, 2023

AlmaLinux 8.7, Portainer, Niginx Proxy Manager, Drawio v20.7.4 I'm experiencing the same issue.

version: '3.5'
services:
  drawio:
    image: jgraph/drawio
    container_name: drawio
    restart: unless-stopped
    environment:
      - DRAWIO_BASE_URL=https://dio.example.com
      - DRAWIO_VIEWER_URL=https://dio.example.com/js/viewer.min.js
      - DRAWIO_LIGHTBOX_URL=https://dio.example.com
    ports:
      - "127.0.0.1:8013:8080"
      - "127.0.0.1:8414:8443"

networks:
  default:
    name: npm_default
    external: true

@jeffshead Did you ever find a solution for this, my setup is very similar with NPM.

@jeffshead
Copy link

jeffshead commented Nov 16, 2023

@jeffshead Did you ever find a solution for this, my setup is very similar with NPM.

Solution: Add /. at the end as JoghurtMitDerEcke suggested in his comment.

Explanation:

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

8 participants