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 /src/main | |
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.
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/io/trygvis/appsh/booter/jetty/JettyWebServer.java | 8 |
1 files changed, 6 insertions, 2 deletions
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); } |