Skip to content

Self-Contained EXPORT_URL Issue with Reverse Proxy Base URL #206

@aque

Description

@aque

I run DRAWIO_SELF_CONTAINED: 1 behind an Nginx reverse proxy and a base url. I have the following DRAWIO_* values set. The application works except for the PDF export. This is because the ExportProxyServlet pointer is set to an explicit path.

      DRAWIO_SERVER_URL: https://host.domain.tld/draw/
      DRAWIO_BASE_URL: https://host.domain.tld/draw

Changing L31 to echo "window.EXPORT_URL = 'service/0'; and make it relative fixes the PDF export issue. I suppose L32 and L34 should follow that format but they were not tested.

if [[ "${DRAWIO_SELF_CONTAINED}" ]]; then
echo "window.EXPORT_URL = '/service/0'; //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." >> $CATALINA_HOME/webapps/draw/js/PreConfig.js
echo "window.PLANT_URL = '/service/1';" >> $CATALINA_HOME/webapps/draw/js/PreConfig.js
elif [[ "${EXPORT_URL}" ]]; then
echo "window.EXPORT_URL = '/service/0';" >> $CATALINA_HOME/webapps/draw/js/PreConfig.js
fi

Edit: I forgot to mention that I am running v29.6.10.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions