Looks like I'm close. I also want to be able to add authentication that will
only apply to WAN use. Is there an easy way to do that? Authentication is
set on the context which applies to both connectors.
final SslSelectChannelConnector sslCnct = new
SslSelectChannelConnector(sslCnxt);
sslCnct.setPort(443);
sslCnct.setHost("0.0.0.0");
final SelectChannelConnector httpCnct = new
SelectChannelConnector();
httpCnct.setPort(80);
httpCnct.setHost("127.0.0.1");
server.setConnectors(new Connector[] { httpCnct, sslCnct
});
From: Will Hoover [mailto:[email protected]]
Sent: Thursday, September 27, 2012 10:32 AM
To: '[email protected]'
Subject: HTTP on LAN and redirect to HTTPS on WAN?
What's the simplest way to setup Jetty 8 to allow HTTP on LAN and redirect
to HTTPS on WAN? I have the HTTPS working, but I need to know the easiest
way to allow HTTP on LAN.
final EnumSet<DispatcherType> dispatchers = EnumSet.range(
DispatcherType.FORWARD, DispatcherType.ERROR);
final ServletContextHandler context = new
ServletContextHandler(
ServletContextHandler.SESSIONS);
context.setContextPath("/");
context.addFilter(GlobalFilter.class, "/*", dispatchers);
context.addServlet(DefaultAppServlet.class, "/");
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users