mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 23:15:49 +01:00
Fix #257, "org.scalatra.ForceHttps" set to true, if --https=true
ScalatraBase.redirect() use "org.scalatra.ForceHttps" in servlet context init parameter when choice 'http' or 'https'.
This commit is contained in:
@@ -53,6 +53,9 @@ public class JettyLauncher {
|
|||||||
context.setDescriptor(location.toExternalForm() + "/WEB-INF/web.xml");
|
context.setDescriptor(location.toExternalForm() + "/WEB-INF/web.xml");
|
||||||
context.setServer(server);
|
context.setServer(server);
|
||||||
context.setWar(location.toExternalForm());
|
context.setWar(location.toExternalForm());
|
||||||
|
if (forceHttps) {
|
||||||
|
context.setInitParameter("org.scalatra.ForceHttps", "true");
|
||||||
|
}
|
||||||
|
|
||||||
server.setHandler(context);
|
server.setHandler(context);
|
||||||
server.start();
|
server.start();
|
||||||
|
|||||||
Reference in New Issue
Block a user