dmcg
09/05/2022, 10:02 AMfun hostContains(s: String) = { request: Request -> request.header("host")?.contains(s) ?: false }.asRouter()
val routes = routes(
hostContains("<http://value-elf.com|value-elf.com>") bind routes(
GET to { request -> Response(OK).body("hello from value-elf") }
),
hostContains("<http://priceomatic.com|priceomatic.com>") bind routes(
GET to { request -> Response(OK).body("hello from priceomatic") }
),
hostContains("<http://webuyanymagicalitem.com|webuyanymagicalitem.com>") bind routes(
GET to { request -> Response(OK).body("hello from webuyanymagicalitem") }
),
)
which is enough to get me through the next video!