remove image endpoint
parent
09819af4d4
commit
ee7d5830fb
|
@ -104,20 +104,6 @@ final class Main(
|
|||
NoContent
|
||||
}
|
||||
|
||||
def image(id: String, @nowarn("cat=unused") hash: String, @nowarn("cat=unused") name: String) =
|
||||
Action.async {
|
||||
env.imageRepo
|
||||
.fetch(id)
|
||||
.map {
|
||||
case None => NotFound
|
||||
case Some(image) =>
|
||||
lila.mon.http.imageBytes.record(image.size.toLong)
|
||||
Ok(image.data).withHeaders(
|
||||
CACHE_CONTROL -> "max-age=1209600"
|
||||
) as image.contentType.getOrElse("image/jpeg")
|
||||
}
|
||||
}
|
||||
|
||||
val robots = Action { req =>
|
||||
Ok {
|
||||
if (env.net.crawlable && req.domain == env.net.domain.value) """User-agent: *
|
||||
|
|
|
@ -588,9 +588,6 @@ GET /class/$id<\w{8}>/student/:username/close controllers.Clas.studentClose(id
|
|||
POST /class/$id<\w{8}>/student/:username/close controllers.Clas.studentClosePost(id: String, username: String)
|
||||
POST /class/$id<\w{8}>/invitation/revoke controllers.Clas.invitationRevoke(id: String)
|
||||
|
||||
# DB image
|
||||
GET /image/:id/:hash/:name controllers.Main.image(id: String, hash: String, name: String)
|
||||
|
||||
# Paste
|
||||
GET /paste controllers.Importer.importGame
|
||||
POST /import controllers.Importer.sendGame
|
||||
|
|
|
@ -34,7 +34,6 @@ object mon {
|
|||
counter("http.csrf.error").withTags(Map("type" -> tpe, "action" -> action, "client" -> client))
|
||||
val fingerPrint = timer("http.fingerPrint.time").withoutTags()
|
||||
def jsmon(event: String) = counter("http.jsmon").withTag("event", event)
|
||||
val imageBytes = histogram("http.image.bytes").withoutTags()
|
||||
}
|
||||
object syncache {
|
||||
def miss(name: String) = counter("syncache.miss").withTag("name", name)
|
||||
|
|
Loading…
Reference in New Issue