WebServer.InternalIP now does something #434

This commit is contained in:
Rsl1122 2017-11-29 10:21:21 +02:00
parent ffdfff92d7
commit dbb5105407
2 changed files with 4 additions and 2 deletions

View File

@ -95,7 +95,7 @@ public class WebServer {
if (!usingHttps) {
Log.infoColor("§eUser Authorization Disabled! (Not possible over http)");
server = HttpServer.create(new InetSocketAddress(port), 10);
server = HttpServer.create(new InetSocketAddress(Settings.WEBSERVER_IP.toString(), port), 10);
}
if (plugin.getInfoManager().isUsingAnotherWebServer()) {
server.createContext("/", new APIRequestHandler(getWebAPI()));
@ -141,7 +141,7 @@ public class WebServer {
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("SunX509");
trustManagerFactory.init(keystore);
server = HttpsServer.create(new InetSocketAddress(port), 10);
server = HttpsServer.create(new InetSocketAddress(Settings.WEBSERVER_IP.toString(), port), 10);
SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
sslContext.init(keyManagerFactory.getKeyManagers(), null/*trustManagerFactory.getTrustManagers()*/, null);

View File

@ -24,6 +24,8 @@ Plugin:
# -----------------------------------------------------
WebServer:
Port: 8804
# InternalIP usually does not need to be changed, only change it if you know what you're doing!
# 0.0.0.0 allocates Internal (local) IP automatically for the WebServer.
InternalIP: 0.0.0.0
Security:
SSL-Certificate: