https://kotlinlang.org logo
#ktor
Title
# ktor
j

janvladimirmostert

10/12/2019, 5:14 AM
is there a way in Ktor to do a 301 redirect from www.domain.com to domain.com ? tried doing that 301 redirect at the DNS level and it seems to cause SSL errors.
found something, Ktor docs is pretty awesome! https://ktor.io/servers/calls/responses.html
had some time to play around with Ktor and get a 301 redirect working now all urls that contains www.domain.com/... will redirect to domain.com/... Maybe adding a "canonical host" feature in Ktor would be nice for exactly this
3 Views