Fix account JSON/RSS not being cacheable due to wrong mime type comparison (#13116)

`request.format` is not a symbol but a `Mime::Type`, so the condition actually
never matched, and a session was created even for those requests, preventing
caching.
signup-info-prompt
ThibG 2020-02-19 22:31:53 +01:00 committed by GitHub
parent 1314bba68a
commit d8e9bae482
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ class AccountsController < ApplicationController
before_action :set_cache_headers before_action :set_cache_headers
before_action :set_body_classes before_action :set_body_classes
skip_around_action :set_locale, if: -> { [:json, :rss].include?(request.format) } skip_around_action :set_locale, if: -> { [:json, :rss].include?(request.format&.to_sym) }
skip_before_action :require_functional! skip_before_action :require_functional!
def show def show