mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-10 07:25:50 +01:00
Fix to make the --host argument work again.
This commit is contained in:
@@ -3,12 +3,14 @@ import org.eclipse.jetty.webapp.WebAppContext;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.net.InetSocketAddress;
|
||||||
import java.security.ProtectionDomain;
|
import java.security.ProtectionDomain;
|
||||||
|
|
||||||
public class JettyLauncher {
|
public class JettyLauncher {
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
String host = null;
|
String host = null;
|
||||||
int port = 8080;
|
int port = 8080;
|
||||||
|
InetSocketAddress address = null;
|
||||||
String contextPath = "/";
|
String contextPath = "/";
|
||||||
boolean forceHttps = false;
|
boolean forceHttps = false;
|
||||||
|
|
||||||
@@ -29,7 +31,13 @@ public class JettyLauncher {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Server server = new Server(port);
|
if(host != null) {
|
||||||
|
address = new InetSocketAddress(host, port);
|
||||||
|
} else {
|
||||||
|
address = new InetSocketAddress(port);
|
||||||
|
}
|
||||||
|
|
||||||
|
Server server = new Server(address);
|
||||||
|
|
||||||
// SelectChannelConnector connector = new SelectChannelConnector();
|
// SelectChannelConnector connector = new SelectChannelConnector();
|
||||||
// if(host != null) {
|
// if(host != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user