mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 23:04:52 +09:00
Add all routes the web interface is served on to the express app and serve the index.html file on. Due to the index html not knowing which path it's hosted under, a path to the root of the web interface is replaced using string substitution from the master server.
7 lines
267 B
React
7 lines
267 B
React
// Calculate basedir of application based on current location and
|
|
// the provided web_root from master server.
|
|
const location = new URL(window.web_root, document.location)
|
|
const basename = location.pathname !== "/" ? location.pathname : "";
|
|
|
|
export default basename;
|