diff --git a/README.md b/README.md index fa6718d..6ccf9af 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,6 @@ - --port=[NUMBER] - --prefix=[CONTEXTPATH] - --host=[HOSTNAME] -- --https=true - --gitbucket.home=[DATA_DIR] To upgrade GitBucket, only replace gitbucket.war. All GitBucket data is stored in HOME/.gitbucket. So if you want to back up GitBucket data, copy this directory to the other disk. @@ -60,7 +59,8 @@ Release Notes -------- ### 1.11 - End of Feb 2014 -- Base URL for redirect, notification and repository URL box is configurable +- Base URL for redirection, notification and repository URL box is configurable +- Remove ```--https``` option because it's possible to substitute in the base url - Headline anchor is available for Markdown contents such as Wiki page - Improve H2 connectivity - Label is available for pull requests not only issues diff --git a/src/main/java/JettyLauncher.java b/src/main/java/JettyLauncher.java index d7b137d..76500f0 100644 --- a/src/main/java/JettyLauncher.java +++ b/src/main/java/JettyLauncher.java @@ -25,8 +25,6 @@ port = Integer.parseInt(dim[1]); } else if(dim[0].equals("--prefix")) { contextPath = dim[1]; - } else if(dim[0].equals("--https") && (dim[1].equals("1") || dim[1].equals("true"))) { - forceHttps = true; } else if(dim[0].equals("--gitbucket.home")){ System.setProperty("gitbucket.home", dim[1]); } @@ -36,7 +34,7 @@ Server server = new Server(); - HttpsSupportConnector connector = new HttpsSupportConnector(forceHttps); + SelectChannelConnector connector = new SelectChannelConnector(); if(host != null) { connector.setHost(host); } @@ -62,19 +60,3 @@ server.join(); } } - -class HttpsSupportConnector extends SelectChannelConnector { - private boolean forceHttps; - - public HttpsSupportConnector(boolean forceHttps) { - this.forceHttps = forceHttps; - } - - @Override - public void customize(final EndPoint endpoint, final Request request) throws IOException { - if (this.forceHttps) { - request.setScheme("https"); - super.customize(endpoint, request); - } - } -}