Refactor Cache-Control
and Vary
definitions (#24347)
This commit is contained in:
@ -1,11 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module WellKnown
|
||||
class NodeInfoController < ActionController::Base
|
||||
class NodeInfoController < ActionController::Base # rubocop:disable Rails/ApplicationController
|
||||
include CacheConcern
|
||||
|
||||
before_action { response.headers['Vary'] = 'Accept' }
|
||||
|
||||
def index
|
||||
expires_in 3.days, public: true
|
||||
render_with_cache json: {}, serializer: NodeInfo::DiscoverySerializer, adapter: NodeInfo::Adapter, expires_in: 3.days, root: 'nodeinfo'
|
||||
|
Reference in New Issue
Block a user