Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] MovedContextHandler

Is there a way to have the MovedContextHandler only respond if the request comes in from a specific port?

I am using a load balancer.  I need to direct all non secure traffic to a secure port on the load balancer.  
but I also am trying to redirect all non www traffic to www.

<Configure class="org.eclipse.jetty.server.handler.MovedContextHandler">
  <Set name="contextPath">/</Set>
  <Set name="newContextURL">https://www.mydomain.com</Set>
  <Set name="permanent">true</Set>
  <Set name="discardPathInfo">false</Set>
  <Set name="discardQuery">false</Set>
  <Set name="virtualHosts">
    <Array type="String">
          <Item>mydomain.com</Item>
    </Array>
  </Set>
</Configure>

Thanks.

Back to the top