diff options
Diffstat (limited to 'src/main/kotlin/io/jamesbarnett')
| -rw-r--r-- | src/main/kotlin/io/jamesbarnett/redditlite/controller/MiscController.kt (renamed from src/main/kotlin/io/jamesbarnett/redditlite/controller/LandingPageController.kt) | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/main/kotlin/io/jamesbarnett/redditlite/controller/LandingPageController.kt b/src/main/kotlin/io/jamesbarnett/redditlite/controller/MiscController.kt index c2881bd..ac6e745 100644 --- a/src/main/kotlin/io/jamesbarnett/redditlite/controller/LandingPageController.kt +++ b/src/main/kotlin/io/jamesbarnett/redditlite/controller/MiscController.kt @@ -2,12 +2,28 @@ 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 LandingPageController { +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: / +""" + } + }
\ No newline at end of file |