mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
BUGFIX: anon cache was mucking with params
This commit is contained in:
@ -20,7 +20,9 @@ module Middleware
|
||||
@is_mobile ||=
|
||||
begin
|
||||
session = @env["rack.session"]
|
||||
params = ActionDispatch::Request.new(@env).params
|
||||
# don't initialize params until later otherwise
|
||||
# you get a broken params on the request
|
||||
params = {}
|
||||
user_agent = @env["HTTP_USER_AGENT"]
|
||||
|
||||
MobileDetection.resolve_mobile_view!(user_agent,params,session) ? :true : :false
|
||||
|
Reference in New Issue
Block a user