Closed phxnsharp closed 1 year ago
There's a bunch of shared code between Lite/on-premises/cloud service (that is being open sourced at the moment), and this is a throw back to when the API used to do authentication based upon the full URL ... but AFAIK it's not required any more.
Structurizr requires browser automation to export diagrams. I attempted to set this up in a Docker compose file that would launch Structurizr lite and then a puppeteer container to export the images, but leave Structurizr lite running for use directly to edit the manual layouts. Docker compose allows you to setup a network and have one service call another one by name. However, this name is not available from outside.
If I call it from a browser at http://localhost:8080 first, then the Puppeteer container fails because the pages return absolute paths to http://localhost:8080. If Puppeteer calls it first, then using my local browser fails because it returns absolute paths to http://structurizr:8080, which only exists inside the Docker world.
This appears to be caused by this code. Better approaches would be to always return the URL that was used for the particular incoming call without saving the URL for use later, or to return relative paths.