in app/com/gu/viewer/controllers/Proxy.scala [48:59]
def redirectRelative(path: String) = AuthAction { request =>
val fromProxy = """^\w+:\/\/([^/]+)\/proxy\/([^/]+).*$""".r
val host = request.host
request.headers.get("Referer") match {
case Some(fromProxy(`host`, service)) =>
Redirect(routes.Proxy.proxy(service, request.uri.tail))
case _ => NotFound(s"Resource not found: $path")
}
}