aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md23
-rw-r--r--pom.xml5
-rw-r--r--src/main/java/io/trygvis/appsh/booter/jetty/JettyWebServer.java8
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 :)
diff --git a/pom.xml b/pom.xml
index 6bea7a5..c8f591b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -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);
}