jgraph / docker-drawio

Dockerized draw.io based on whichever is the most secure image at the time.
GNU General Public License v3.0
1.59k stars 370 forks source link

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

Open techsupportkoeln opened 11 months ago

techsupportkoeln commented 11 months ago

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):

Desktop (please complete the following information):

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

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:

networks: drawionet:

volumes: fonts_volume: `

draw draw2

techsupportkoeln commented 11 months ago

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.

m-mohamedin commented 11 months ago

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

github-actions[bot] commented 1 month ago

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.