Fork me on GitHub
#ring
<
2019-12-04
>
cch104:12:44

Is it possible to get a jetty-based server using wrap-ssl-redirect to redirect http requests to https and employ dynamically assigned ports? There is a chicken-and-egg problem in that the handler (including the middleware) must be provided to create the server, but the port is not known until after the server starts.

cch104:12:16

Jetty itself (as of version 9) appears to get around this problem by injecting a sort of middleware (the SecuredRedirectHandler) that has access to the resolved ssl port in the HttpConfiguration.