Change to platform userAgent.

This commit is contained in:
hikaruworld
2014-08-13 17:08:46 +09:00
committed by ymorika
parent f52bd2bcc0
commit 7b37d6b571
3 changed files with 8 additions and 8 deletions

View File

@@ -145,7 +145,7 @@ 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 {
val platform = 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"