about summary refs log tree commit diff
path: root/app/controllers/accounts_controller.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-10-03 11:10:12 +0200
committerThibaut Girka <thib@sitedethib.com>2019-10-03 11:10:12 +0200
commita84aedb7a7f050cbf5293351723f55a904992b3a (patch)
tree769d397390665bcddf9b44fc1ad4418b2757c5f1 /app/controllers/accounts_controller.rb
parent857c67f31b23b9c496e07eda41755ba449a37f17 (diff)
parentbae268b2f6501ccb0ceeb8dd36180698839c4d3c (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- app/models/media_attachment.rb
  Upstream raised max image size from 8MB to 10MB while our limit is
  configurable. Raised the default to 10MB.
Diffstat (limited to 'app/controllers/accounts_controller.rb')
-rw-r--r--app/controllers/accounts_controller.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb
index 1c36813d0..c4ee22847 100644
--- a/app/controllers/accounts_controller.rb
+++ b/app/controllers/accounts_controller.rb
@@ -9,7 +9,7 @@ class AccountsController < ApplicationController
   before_action :set_cache_headers
   before_action :set_body_classes
 
-  skip_around_action :set_locale, if: -> { request.format == :json }
+  skip_around_action :set_locale, if: -> { [:json, :rss].include?(request.format) }
   skip_before_action :require_functional!
 
   def show
@@ -39,7 +39,7 @@ class AccountsController < ApplicationController
       end
 
       format.rss do
-        expires_in 0, public: true
+        expires_in 1.minute, public: true
 
         @statuses = filtered_statuses.without_reblogs.without_replies.limit(PAGE_SIZE)
         @statuses = cache_collection(@statuses, Status)
@@ -130,11 +130,11 @@ class AccountsController < ApplicationController
   end
 
   def media_requested?
-    request.path.ends_with?('/media')
+    request.path.ends_with?('/media') && !tag_requested?
   end
 
   def replies_requested?
-    request.path.ends_with?('/with_replies')
+    request.path.ends_with?('/with_replies') && !tag_requested?
   end
 
   def tag_requested?