define "rewrite"... redirect? alter the Host heade...
# server
m
define "rewrite"... redirect? alter the Host header? have vhosts for both domains?
j
I am probably wanting to redirect site.com to www.site.com or site.com/page to www.site.com/page
m
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
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
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