Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] 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, "/");

 

 

 

 


Back to the top