闭社主体 forked from https://github.com/tootsuite/mastodon
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
425 B

  1. # frozen_string_literal: true
  2. module WellKnown
  3. class HostMetaController < ActionController::Base
  4. include RoutingHelper
  5. before_action { response.headers['Vary'] = 'Accept' }
  6. def show
  7. @webfinger_template = "#{webfinger_url}?resource={uri}"
  8. respond_to do |format|
  9. format.xml { render content_type: 'application/xrd+xml' }
  10. end
  11. expires_in(3.days, public: true)
  12. end
  13. end
  14. end