support Desktop in Clone

This commit is contained in:
hikaruworld
2014-08-10 12:48:05 +09:00
parent 66efdac757
commit f52bd2bcc0
3 changed files with 18 additions and 0 deletions

View File

@@ -145,6 +145,11 @@ case class Context(settings: SystemSettingsService.SystemSettings, loginAccount:
val currentPath = request.getRequestURI.substring(request.getContextPath.length)
val baseUrl = settings.baseUrl(request)
val host = new java.net.URL(baseUrl).getHost
val userAgent = request.getHeader("User-Agent") match {
case agent if agent.contains("Mac") => "mac"
case agent if agent.contains("Linux") => "linux"
case agent if agent.contains("Win") => "windows"
}
/**
* Get object from cache.