Merge branch 'mc/1.13' into feature/live

This commit is contained in:
Blue (Lukas Rieger) 2020-08-08 10:46:35 +02:00
commit f054513e8e
7 changed files with 16 additions and 8 deletions

View File

@ -47,8 +47,9 @@ webserver {
enabled: true
# The IP-Adress that the webserver binds to.
# If this setting is commented out, bluemap tries to find the default ip-adress of your system.
# Use "0.0.0.0" to bind to all available local adresses.
# If you only want to access it locally use "localhost".
# Default is "0.0.0.0"
#ip: "localhost"
#ip: "127.0.0.1"

View File

@ -44,10 +44,11 @@ webserver {
# With this setting you can enable the integrated web-server.
# Default is disabled
enabled: false
# The IP-Adress that the webserver binds to.
# If this setting is commented out, bluemap tries to find the default ip-adress of your system.
# Use "0.0.0.0" to bind to all available local adresses.
# If you only want to access it locally use "localhost".
# Default is "0.0.0.0"
#ip: "localhost"
#ip: "127.0.0.1"

View File

@ -27,6 +27,7 @@
import java.io.File;
import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
@ -109,7 +110,9 @@ private void loadWebConfig(ConfigurationNode node) throws IOException {
if (webserverEnabled) {
//ip
String webserverBindAdressString = node.getNode("ip").getString("");
if (webserverBindAdressString.isEmpty()) {
if (webserverBindAdressString.isEmpty() || webserverBindAdressString.equals("0.0.0.0") || webserverBindAdressString.equals("::0")) {
webserverBindAdress = new InetSocketAddress(0).getAddress(); // 0.0.0.0
} else if (webserverBindAdressString.equals("#getLocalHost")) {
webserverBindAdress = InetAddress.getLocalHost();
} else {
webserverBindAdress = InetAddress.getByName(webserverBindAdressString);

View File

@ -110,7 +110,7 @@ export default class BlueMap {
await this.ui.load();
this.start();
}).catch(error => {
this.onLoadError("Initialization: " + error.toString());
this.onLoadError("Initialization: " + (error ? error.toString() : "unknown"));
});
}

View File

@ -47,8 +47,9 @@ webserver {
enabled: true
# The IP-Adress that the webserver binds to.
# If this setting is commented out, bluemap tries to find the default ip-adress of your system.
# Use "0.0.0.0" to bind to all available local adresses.
# If you only want to access it locally use "localhost".
# Default is "0.0.0.0"
#ip: "localhost"
#ip: "127.0.0.1"

View File

@ -47,8 +47,9 @@ webserver {
enabled: true
# The IP-Adress that the webserver binds to.
# If this setting is commented out, bluemap tries to find the default ip-adress of your system.
# Use "0.0.0.0" to bind to all available local adresses.
# If you only want to access it locally use "localhost".
# Default is "0.0.0.0"
#ip: "localhost"
#ip: "127.0.0.1"

View File

@ -42,8 +42,9 @@ webserver {
enabled: true
# The IP-Adress that the webserver binds to.
# If this setting is commented out, bluemap tries to find the default ip-adress of your system.
# Use "0.0.0.0" to bind to all available local adresses.
# If you only want to access it locally use "localhost".
# Default is "0.0.0.0"
#ip: "localhost"
#ip: "127.0.0.1"