BlueMap

BlueMap

85.1k Downloads

Support running BlueMap web front end on subdirectory

RanolP opened this issue · 3 comments

commented

Is your feature request related to a problem? Please describe.

I wish to expose my BlueMap URL like https://my-domain-here/map.

Firstly, I set up a reverse proxy according to the BlueMap Wiki. And not surprisingly, HTML/CSS/JS files, provided by the plugin, think that the files are on the root. So the index.html will seek for https://my-domain-here/js/app.cb3bdf15.js, which wouldn't be exposed due to reverse proxy (the file is available on https://my-domain-here/map/js/app.cb3bdf15.js).

So I figured out the BlueMap-Minecraft/BlueMapVue and set the publicPath value in vue.config.js to respect the subdirectory /map. Built index.html and JS/CSS files seemed ok, but the JS thinks that files like settings.json are on the root. So it'll request https://my-domain-here/settings.json, which is not the path exposed by the reverse proxy.

Describe the solution you'd like

I think supporting the subdirectory with the plugin seems hard to implement because the front end needs several build steps and tools. Thus, the JS code on the BlueMapVue should be aware of altering basepath and the documentation should inform that the custom build of the web front end is required. About the method of altering the basepath of external assets, I think supplying basepath with env var at the build time is the easy-to-use solution.

Thanks for reading the comment, and also thanks for creating a great project!

commented

BlueMaps official demo https://bluecolored.de/bluemap/ is running on a subdirectory ...
soo .. it should just work ^^
I think there is something wrong with your setup :)

(Edit: the demo uses the unmodified webapp from bluemap, no special configuration)

commented

If you need support with this, please visit our discord :)

commented

Sorry, I've rechecked my configuration and I've found a typo. Thanks for your attention. Have a nice day!