Base URL customization per this issue is not working, the following files still attempt to load from the root instead of the noted subdirectory (/diagram):
croppie.min.css
grapheditor.css
PreConfig.js
apple-touch-icon.png
favicon-16x16.png
Nginx location block
location /diagram { # begin diagram block
auth_request /auth-4;
proxy_pass https://diagram-url:8443/;
add_header X-Frame-Options "SAMEORIGIN";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
Docker-compose.yml
version: '3.5'
services:
drawio:
image: fjudith/draw.io
container_name: drawio
restart: unless-stopped
ports:
- 8080:8080
- 8443:8443
environment:
PUBLIC_DNS: example.org
volumes:
- ./config/PreConfig.js:/usr/local/tomcat/webapps/draw/js/PreConfig.js
PreConfig.js
/**
* Copyright (c) 2006-2019, JGraph Ltd
* Copyright (c) 2006-2019, draw.io AG
*/
// Overrides of global vars need to be pre-loaded
window.EXPORT_URL = '/export'; //This points to ExportProxyServlet which uses the local export server at port 8000.
//This proxy configuration allows https requests to the export server via Tomcat.
window.PLANT_URL = 'REPLACE_WITH_YOUR_PLANTUML_SERVER';
// window.DRAWIO_BASE_URL = 'https://mcp.lunacite.com/diagram';
// window.DRAWIO_VIEWER_URL = 'https://mcp.lunacite.com/diagram/js/viewer.min.js';
window.DRAW_MATH_URL = 'math';
window.DRAWIO_CONFIG = null; //Replace with your custom draw.io configurations. For more details, https://desk.draw.io/support/solutions/articles/16000058316
Base URL customization per this issue is not working, the following files still attempt to load from the root instead of the noted subdirectory (/diagram):
croppie.min.css
grapheditor.css
PreConfig.js
apple-touch-icon.png
favicon-16x16.png
Nginx location block
Docker-compose.yml
PreConfig.js