blob: ac6e74546276a58de2dc6edcdd7889049712a9aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package io.jamesbarnett.redditlite.controller
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.ResponseBody
import org.springframework.web.servlet.ModelAndView
@Controller
class MiscController {
@GetMapping("/")
fun renderLandingPage() : ModelAndView {
return ModelAndView("landing")
}
@GetMapping("/healthcheck")
@ResponseBody
fun healthCheck() : String {
return "ok"
}
@GetMapping("/robots.txt")
@ResponseBody
fun robotsTxt() : String {
return """User-agent: *
Disallow: /
"""
}
}
|