Fix /api/v1/instance/domain_blocks being unconditionally cached (#24662)
This commit is contained in:
parent
62ab7506d6
commit
b0bf6216e6
2 changed files with 9 additions and 4 deletions
|
@ -156,8 +156,8 @@ module CacheConcern
|
|||
end
|
||||
|
||||
class_methods do
|
||||
def vary_by(value)
|
||||
before_action do |controller|
|
||||
def vary_by(value, **kwargs)
|
||||
before_action(**kwargs) do |controller|
|
||||
response.headers['Vary'] = value.respond_to?(:call) ? controller.instance_exec(&value) : value
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue