ソースを参照

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.
master^2
ThibG 4年前
committed by GitHub
コミット
d8e9bae482
この署名に対応する既知のキーがデータベースに存在しません GPGキーID: 4AEE18F83AFDEB23
1個のファイルの変更1行の追加1行の削除
  1. +1
    -1
      app/controllers/accounts_controller.rb

+ 1
- 1
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: -> { [:json, :rss].include?(request.format) }
skip_around_action :set_locale, if: -> { [:json, :rss].include?(request.format&.to_sym) }
skip_before_action :require_functional!

def show


読み込み中…
キャンセル
保存