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 enabled: true
# The IP-Adress that the webserver binds to. # 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". # If you only want to access it locally use "localhost".
# Default is "0.0.0.0"
#ip: "localhost" #ip: "localhost"
#ip: "127.0.0.1" #ip: "127.0.0.1"

View File

@ -44,10 +44,11 @@ webserver {
# With this setting you can enable the integrated web-server. # With this setting you can enable the integrated web-server.
# Default is disabled # Default is disabled
enabled: false enabled: false
# The IP-Adress that the webserver binds to. # 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". # If you only want to access it locally use "localhost".
# Default is "0.0.0.0"
#ip: "localhost" #ip: "localhost"
#ip: "127.0.0.1" #ip: "127.0.0.1"

View File

@ -27,6 +27,7 @@
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.ArrayList; import java.util.ArrayList;
@ -109,7 +110,9 @@ private void loadWebConfig(ConfigurationNode node) throws IOException {
if (webserverEnabled) { if (webserverEnabled) {
//ip //ip
String webserverBindAdressString = node.getNode("ip").getString(""); 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(); webserverBindAdress = InetAddress.getLocalHost();
} else { } else {
webserverBindAdress = InetAddress.getByName(webserverBindAdressString); webserverBindAdress = InetAddress.getByName(webserverBindAdressString);

View File

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

View File

@ -47,8 +47,9 @@ webserver {
enabled: true enabled: true
# The IP-Adress that the webserver binds to. # 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". # If you only want to access it locally use "localhost".
# Default is "0.0.0.0"
#ip: "localhost" #ip: "localhost"
#ip: "127.0.0.1" #ip: "127.0.0.1"

View File

@ -47,8 +47,9 @@ webserver {
enabled: true enabled: true
# The IP-Adress that the webserver binds to. # 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". # If you only want to access it locally use "localhost".
# Default is "0.0.0.0"
#ip: "localhost" #ip: "localhost"
#ip: "127.0.0.1" #ip: "127.0.0.1"

View File

@ -42,8 +42,9 @@ webserver {
enabled: true enabled: true
# The IP-Adress that the webserver binds to. # 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". # If you only want to access it locally use "localhost".
# Default is "0.0.0.0"
#ip: "localhost" #ip: "localhost"
#ip: "127.0.0.1" #ip: "127.0.0.1"