diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/accounts_controller.rb | 8 | ||||
-rw-r--r-- | app/controllers/api/v1/accounts_controller.rb | 2 |
2 files changed, 5 insertions, 5 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? diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb index c12e1c12e..d68d2715f 100644 --- a/app/controllers/api/v1/accounts_controller.rb +++ b/app/controllers/api/v1/accounts_controller.rb @@ -78,7 +78,7 @@ class Api::V1::AccountsController < Api::BaseController end def account_params - params.permit(:username, :email, :password, :agreement, :locale) + params.permit(:username, :email, :password, :agreement, :locale, :reason) end def check_enabled_registrations |