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

Export URL with <my-url>:8443 instead of <my-url> #142

Open
2 tasks done
techsupportkoeln opened this issue Dec 15, 2023 · 2 comments
Open
2 tasks done

Export URL with <my-url>:8443 instead of <my-url> #142

techsupportkoeln opened this issue Dec 15, 2023 · 2 comments
Labels

Comments

@techsupportkoeln
Copy link

  • 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 installed draw.io using Docker-Compose. I use Nginx for the HTTPS call.
My Draw.io instance can also be accessed via HTTPS and works, but as soon as I want to export a URL, the export link contains the domain and port 8443.
I have already changed DRAWIO_LIGHTBOX_URL in docker-compose.yml, but if I remove port 8443 there, draw.io no longer works. I see the error "Error loading file No file selected".
If I manually adjust the copied URL and remove the port, I can access the URL without any problem.

To Reproduce
Steps to reproduce the behavior:

  1. Install draw.io via docker-compose
  2. use nginx for HTTPS
  3. make an export of the diagram
  4. the export url has the Port 8443, you can delete the port and the export url works.

Expected behavior
the export url should not contain port 8443.

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

  • draw.io version 22.1.9

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser Firefox

I tested the problem in incognito/private mode with all browser extensions switched off, write "yes" below:

  • yes

Nginx configuration:
`
server {
listen [::]:80;
listen 80;

 server_name draw.<my-url.de>;

 return 301 https://draw.<my-url.de>$request_uri;

}

server {
listen [::]:443 http2 ssl;
listen 443 http2 ssl;

 server_name draw.<my-url.de>;
 ssl_session_timeout  5m;
 ssl_certificate /etc/ssl/certs/draw.crt;
 ssl_certificate_key /etc/ssl/private/draw.key;

 location / {
     proxy_set_header X-Forwarded-Host $host;
     proxy_set_header X-Forwarded-Server $host;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     proxy_pass https://localhost:8443;
     client_max_body_size 100M;
 }

}
`

Draw.io configuration:
`
version: '3'
services:
plantuml-server:
image: plantuml/plantuml-server
expose:
- "8080"
networks:
- drawionet
volumes:
- fonts_volume:/usr/share/fonts/drawio
image-export:
image: jgraph/export-server
expose:
- "8000"
networks:
- drawionet
volumes:
- fonts_volume:/usr/share/fonts/drawio
environment:
- DRAWIO_BASE_URL=https://draw.<my-url.de>:8443
drawio:
image: jgraph/drawio
ports:
- "8443:8443"
- "8080:8080"
links:
- plantuml-server:plantuml-server
- image-export:image-export
depends_on:
- plantuml-server
- image-export
networks:
- drawionet
environment:
- DRAWIO_SELF_CONTAINED=1
- PLANTUML_URL=https://draw.<my-url.de>:8443/
- EXPORT_URL=https://draw.<my-url.de>:8443/
- DRAWIO_BASE_URL=https://draw.<my-url.de>:8443
- DRAWIO_SERVER_URL=https://draw.<my-url.de>:8443/
- DRAWIO_CSP_HEADER=${DRAWIO_CSP_HEADER}
- DRAWIO_VIEWER_URL=https://draw.<my-url.de>/js/viewer.min.js
- DRAWIO_LIGHTBOX_URL=https://draw.<my-url.de>:8443
- DRAWIO_CONFIG=${DRAWIO_CONFIG}
- DRAWIO_GOOGLE_CLIENT_ID=${DRAWIO_GOOGLE_CLIENT_ID}
- DRAWIO_GOOGLE_APP_ID=${DRAWIO_GOOGLE_APP_ID}
- DRAWIO_GOOGLE_CLIENT_SECRET=${DRAWIO_GOOGLE_CLIENT_SECRET}
- DRAWIO_GOOGLE_VIEWER_CLIENT_ID=${DRAWIO_GOOGLE_VIEWER_CLIENT_ID}
- DRAWIO_GOOGLE_VIEWER_APP_ID=${DRAWIO_GOOGLE_VIEWER_APP_ID}
- DRAWIO_GOOGLE_VIEWER_CLIENT_SECRET=${DRAWIO_GOOGLE_VIEWER_CLIENT_SECRET}
- DRAWIO_MSGRAPH_CLIENT_ID=${DRAWIO_MSGRAPH_CLIENT_ID}
- DRAWIO_MSGRAPH_CLIENT_SECRET=${DRAWIO_MSGRAPH_CLIENT_SECRET}
- DRAWIO_MSGRAPH_TENANT_ID=${DRAWIO_MSGRAPH_TENANT_ID}
- DRAWIO_GITLAB_ID=${DRAWIO_GITLAB_ID}
- DRAWIO_GITLAB_SECRET=${DRAWIO_GITLAB_SECRET}
- DRAWIO_GITLAB_URL=${DRAWIO_GITLAB_URL}
- DRAWIO_CLOUD_CONVERT_APIKEY=${DRAWIO_CLOUD_CONVERT_APIKEY}

healthcheck:
  test: ["CMD-SHELL", "curl -f https://draw.<my-url.de> || exit 1"]
  interval: 1m30s
  timeout: 10s
  retries: 5
  start_period: 10s

networks:
drawionet:

volumes:
fonts_volume:
`

draw
draw2

@techsupportkoeln
Copy link
Author

if i change

nothing happend. The export url is still with the port and draw.io works.

if i change

i got the Error loading file message in the browser.

@davidjgraph davidjgraph transferred this issue from jgraph/drawio Dec 28, 2023
@m-mohamedin
Copy link

DRAWIO_LIGHTBOX_URL in current version must be different from the BASE/SERVER URL (e.g, a different subdomain)

In the next version, we'll remove this limitation

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

No branches or pull requests

2 participants