configurable crawlable attribute

analysismenu2
Thibault Duplessis 2016-09-25 23:48:52 +02:00
parent b89a79f9d0
commit eb2d41aa40
3 changed files with 4 additions and 2 deletions

View File

@ -127,9 +127,9 @@ object Main extends LilaController {
}
}
def robots = Action { req =>
val robots = Action { _ =>
Ok {
if (req.domain endsWith ".lichess.org")
if (Env.api.Net.Crawlable)
"User-agent: *\nAllow: /\nDisallow: /game/export"
else
"User-agent: *\nDisallow: /"

View File

@ -13,6 +13,7 @@ net {
version = 1126
}
email = "contact@lichess.org"
crawlable = false
}
forcedev = false
play {

View File

@ -44,6 +44,7 @@ final class Env(
val AssetDomain = config getString "net.asset.domain"
val AssetVersion = config getInt "net.asset.version"
val Email = config getString "net.email"
val Crawlable = config getBoolean "net.crawlable"
}
val PrismicApiUrl = config getString "prismic.api_url"
val EditorAnimationDuration = config duration "editor.animation.duration"