mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-11 16:05:49 +01:00
Change to platform userAgent.
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user