Rails: Detecting user agent works in development but not production?

后端 未结 2 1970
遇见更好的自我
遇见更好的自我 2021-01-03 01:40

I am trying to detect Blackberry user agents in my app, which works fine in my development version. But nothing happens when I redeploy the app in production.

applic

相关标签:
2条回答
  • Try:

    request.user_agent
    
    0 讨论(0)
  • 2021-01-03 02:11

    Are you using Apache or nginx in front of your mongrel(s)?

    Are you logging the user_agent? This is from my nginx.conf:

    log_format main '$remote_addr - $remote_user [$time_local] $request '
                      '"$status" $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "http_x_forwarded_for"';
    
    0 讨论(0)
提交回复
热议问题