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:
bati11
2014-02-02 02:47:09 +09:00
parent a08316bba0
commit 202c920064

View File

@@ -53,6 +53,9 @@ public class JettyLauncher {
context.setDescriptor(location.toExternalForm() + "/WEB-INF/web.xml");
context.setServer(server);
context.setWar(location.toExternalForm());
if (forceHttps) {
context.setInitParameter("org.scalatra.ForceHttps", "true");
}
server.setHandler(context);
server.start();