If your load balancing layer allows you to define that (e.g. nginx) I'd do it there. Otherwise, add a jetty handler for that vhost that unconditionally redirects.
☝️ 2
mp
11/26/2018, 1:38 PM
Adding that sort of logic to your application itself is doable, but a bit messy. Ideally such things would be orthogonal to your app logic.
(assuming ktor's jetty integration gives you access to the underlying jetty engine...)
j
Jared
11/26/2018, 3:40 PM
Thanks. I am running my app in azure's web app for containers so I don't manage the load balancing. So I think I will need to take a look at implementing a Jetty handler