]> cat aescling's git repositories - mastodon.git/blob - app/controllers/well_known/nodeinfo_controller.rb
Add a nodeinfo endpoint (#12002)
[mastodon.git] / app / controllers / well_known / nodeinfo_controller.rb
1 # frozen_string_literal: true
2
3 module WellKnown
4 class NodeInfoController < ActionController::Base
5 include CacheConcern
6
7 before_action { response.headers['Vary'] = 'Accept' }
8
9 def index
10 expires_in 3.days, public: true
11 render_with_cache json: {}, serializer: NodeInfo::DiscoverySerializer, adapter: NodeInfo::Adapter, expires_in: 3.days, root: 'nodeinfo'
12 end
13
14 def show
15 expires_in 30.minutes, public: true
16 render_with_cache json: {}, serializer: NodeInfo::Serializer, adapter: NodeInfo::Adapter, expires_in: 30.minutes, root: 'nodeinfo'
17 end
18 end
19 end
This page took 0.0828 seconds and 4 git commands to generate.