diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2012-12-20 18:06:11 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2012-12-20 18:06:11 +0100 |
commit | afb73976369bea83106ceddc08dabb0e4ea7b5c5 (patch) | |
tree | ed2d8fc81195d4547b6024b86921c16afde31c1d | |
parent | 324180dd5140fa9768111dcd509fef03feb1bfa2 (diff) | |
download | app.sh-booter-jetty-afb73976369bea83106ceddc08dabb0e4ea7b5c5.tar.gz app.sh-booter-jetty-afb73976369bea83106ceddc08dabb0e4ea7b5c5.tar.bz2 app.sh-booter-jetty-afb73976369bea83106ceddc08dabb0e4ea7b5c5.tar.xz app.sh-booter-jetty-afb73976369bea83106ceddc08dabb0e4ea7b5c5.zip |
o Upgrading to 8.1.8.
o Setting the "forwarded" flag on the connector to true so that it'll use any info from mod_proxy when the app requests the remote address.
-rw-r--r-- | README.md | 23 | ||||
-rw-r--r-- | pom.xml | 5 | ||||
-rw-r--r-- | src/main/java/io/trygvis/appsh/booter/jetty/JettyWebServer.java | 8 |
3 files changed, 32 insertions, 4 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..5d767f8 --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# Change Log + +## 8.1.8.v20121106+1 - 2012-12-20 + +Upgrading to 8.1.8. + +Setting the "forwarded" flag on the connector to true so that it'll use any info from mod_proxy when the app requests +the remote address. + +* <http://docs.codehaus.org/display/JETTY/Configuring+Connectors> - Look for "forwarded" +* <http://docs.codehaus.org/display/JETTY/Configuring+mod_proxy> +* <http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers> + + +## 8.1.7.v20120910+1 - 2012-10-13 + +Initial release + +# TODO + +* Make sure the connector useful for websockets is used by default. +* Make sure the file hack for windows is used by default. +* Make a proper DSL :) @@ -8,9 +8,9 @@ </parent> <groupId>io.trygvis.appsh</groupId> <artifactId>booter-jetty</artifactId> - <version>8.1.7.v20120910+2-SNAPSHOT</version> + <version>8.1.8.v20121106+1-SNAPSHOT</version> <properties> - <versions.jetty8>8.1.7.v20120910</versions.jetty8> + <versions.jetty8>8.1.8.v20121106</versions.jetty8> </properties> <dependencies> <dependency> @@ -25,6 +25,7 @@ </dependency> <!-- + Same for 8.1.8. $ (cd jetty-distribution-8.1.7.v20120910; find * -name \*.jar|sort|grep jsp) lib/jsp/com.sun.el-2.2.0.v201108011116.jar lib/jsp/javax.el-2.2.0.v201108011116.jar diff --git a/src/main/java/io/trygvis/appsh/booter/jetty/JettyWebServer.java b/src/main/java/io/trygvis/appsh/booter/jetty/JettyWebServer.java index 9ee8e24..4783150 100644 --- a/src/main/java/io/trygvis/appsh/booter/jetty/JettyWebServer.java +++ b/src/main/java/io/trygvis/appsh/booter/jetty/JettyWebServer.java @@ -1,6 +1,5 @@ package io.trygvis.appsh.booter.jetty; -import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.ContextHandler; import org.eclipse.jetty.server.handler.ContextHandlerCollection; @@ -53,8 +52,13 @@ public class JettyWebServer { Server server = new Server(); if (httpPort != 0) { - Connector connector = new SelectChannelConnector(); + SelectChannelConnector connector = new SelectChannelConnector(); connector.setPort(httpPort); + + // http://docs.codehaus.org/display/JETTY/Configuring+Connectors - Look for "forwarded" + // http://docs.codehaus.org/display/JETTY/Configuring+mod_proxy + // http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers + connector.setForwarded(true); server.addConnector(connector); } |