~cytrogen/masto-fe

ref: 4d3a12921254f992f649ad84f88ef947b9adc13d masto-fe/lib/action_controller/conditional_get_extensions.rb -rw-r--r-- 433 bytes
4d3a1292 — Plastikmensch Fix public TL not indicating new toots when `onlyRemote` is enabled (#26247) 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module ActionController
  module ConditionalGetExtensions
    def expires_in(*)
      # This backports a fix from Rails 7 so that a more private Cache-Control
      # can be overriden by calling expires_in on a specific controller action
      response.cache_control.delete(:no_store)

      super
    end
  end
end

ActionController::ConditionalGet.prepend(ActionController::ConditionalGetExtensions)