From 387dea459220cb13e3710af298d7829223917376 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Wed, 7 Apr 2010 19:00:23 -0400 Subject: Add useHttpsUrls and hidePorts config options --- infrastructure/net.appjet.oui/config.scala | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'infrastructure/net.appjet.oui') diff --git a/infrastructure/net.appjet.oui/config.scala b/infrastructure/net.appjet.oui/config.scala index 6201816..2b0e47a 100644 --- a/infrastructure/net.appjet.oui/config.scala +++ b/infrastructure/net.appjet.oui/config.scala @@ -80,6 +80,8 @@ object config { { val argName = "directory" } def appHome = stringOrElse("appHome", ""); + @ConfigParam("Whether to generate https URLs even if running locally behind HTTP (useful for Apache handling HTTPS)") + def useHttpsUrls = boolOrElse("useHttpsUrls", false); @ConfigParam("Search path for modules imported via \"import\". Defaults to current working directory.") { val argName = "dir1:dir2:..." } @@ -114,6 +116,9 @@ object config { else ("", Integer.parseInt(s)) + @ConfigParam("Whether to show the port numbers to the outside world (false: assume ports visible from the outside are the default http/https ports)") + def hidePorts = boolOrElse("hidePorts", false); + @ConfigParam("[host:]port on which to serve the app. Default: 8080.") { val argName = "[host:]port" } def listen = stringOrElse("listen", "8080"); -- cgit v1.2.3-1-g7c22 From 674d560a2fdbedbda0a3fc3328be102e884b345b Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Wed, 7 Apr 2010 19:04:22 -0400 Subject: Add REMOVED_COS_OF_COS markers so those that want to enable support provided by cos.jar can easily find what to uncomment. --- infrastructure/net.appjet.oui/execution.scala | 5 +++++ infrastructure/net.appjet.oui/main.scala | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'infrastructure/net.appjet.oui') diff --git a/infrastructure/net.appjet.oui/execution.scala b/infrastructure/net.appjet.oui/execution.scala index 63749b1..f4f4d9e 100644 --- a/infrastructure/net.appjet.oui/execution.scala +++ b/infrastructure/net.appjet.oui/execution.scala @@ -34,6 +34,9 @@ import net.appjet.common.util.{HttpServletRequestFactory, BetterFile}; import Util.enumerationToRichEnumeration; +// Removed due to licensing issues; REMOVED_COS_OF_COS +// import com.oreilly.servlet.MultipartFilter; + class RequestWrapper(val req: HttpServletRequest) { req.setCharacterEncoding("UTF-8"); // private lazy val parameterNames = @@ -124,6 +127,8 @@ class RequestWrapper(val req: HttpServletRequest) { else null; } + + // Depends on cos.jar; REMOVED_COS_OF_COS def files(globalScope: Scriptable): Object = { // if (! req.isInstanceOf[com.oreilly.servlet.MultipartWrapper]) { new ScriptableAdapter(); diff --git a/infrastructure/net.appjet.oui/main.scala b/infrastructure/net.appjet.oui/main.scala index 42cd268..67c1f6f 100644 --- a/infrastructure/net.appjet.oui/main.scala +++ b/infrastructure/net.appjet.oui/main.scala @@ -32,7 +32,7 @@ import org.mortbay.jetty.handler.{HandlerCollection, RequestLogHandler, HandlerL import org.mortbay.jetty.{Server, NCSARequestLog, Request, Response}; import org.mortbay.servlet.GzipFilter; -// removed due to license restrictions +// removed due to license restrictions; REMOVED_COS_OF_COS // import com.oreilly.servlet.MultipartFilter; import net.appjet.common.util.{BetterFile, HttpServletRequestFactory}; @@ -220,6 +220,8 @@ object main { val handler = new Context(server, "/", Context.NO_SESSIONS | Context.NO_SECURITY); handler.addServlet(new ServletHolder(new OuiServlet), "/"); +// removed due to license restrictions; REMOVED_COS_OF_COS + // val filterHolder = new FilterHolder(new MultipartFilter()); // filterHolder.setInitParameter("uploadDir", System.getProperty("java.io.tmpdir")); // handler.addFilter(filterHolder, "/*", 1); -- cgit v1.2.3-1-g7c22