You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
598 B

  1. # frozen_string_literal: true
  2. module WellKnown
  3. class NodeInfoController < ActionController::Base
  4. include CacheConcern
  5. before_action { response.headers['Vary'] = 'Accept' }
  6. def index
  7. expires_in 3.days, public: true
  8. render_with_cache json: {}, serializer: NodeInfo::DiscoverySerializer, adapter: NodeInfo::Adapter, expires_in: 3.days, root: 'nodeinfo'
  9. end
  10. def show
  11. expires_in 30.minutes, public: true
  12. render_with_cache json: {}, serializer: NodeInfo::Serializer, adapter: NodeInfo::Adapter, expires_in: 30.minutes, root: 'nodeinfo'
  13. end
  14. end
  15. end