You can use the WEB-INF/web.xml and add ...

<security-constraint>
  <web-resource-collection>
    <url-pattern>/</url-pattern>
  </web-resource-collection>
  <user-data-constraint>
    <transport-guarantee>CONFIDENTIAL</transport-guarantee>
  </user-data-constraint>
</security-constraint>


That will redirect the traffic from HTTP to HTTPS (or whatever your
HttpConfiguration's port for secure/confidential is)
websocket ws:// will also redirect to wss://

And if you have SPDY setup on that port, and the browser is capable of it,
it will use it.


--
Joakim Erdfelt <[email protected]>
webtide.com <http://www.webtide.com/> - intalio.com/jetty
Expert advice, services and support from from the Jetty & CometD experts
eclipse.org/jetty - cometd.org


On Tue, Jan 28, 2014 at 3:04 PM, Nils Kilden-Pedersen <[email protected]>wrote:

> Not sure if any of these conflict or overlaps in terms of configuration,
> but I'd like to know the easiest way to configure 9.1 to run HTTPS for all
> pages (redirecting HTTP hits automatically), WSS for all websocket
> communication and as a bonus touch, if possible, do it as SPDY.
>
> _______________________________________________
> jetty-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
>
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to