mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
BUGFIX: mobile ui was being cached for anon views
This commit is contained in:
@@ -7,6 +7,7 @@ enabled = if Rails.configuration.respond_to?(:enable_anon_caching)
|
||||
end
|
||||
|
||||
if !ENV['DISCOURSE_DISABLE_ANON_CACHE'] && enabled
|
||||
Rails.configuration.middleware.insert 0, Middleware::AnonymousCache
|
||||
# in an ideal world this is position 0, but mobile detection uses ... session and request and params
|
||||
Rails.configuration.middleware.insert_after ActionDispatch::ParamsParser, Middleware::AnonymousCache
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user