host_meta_controller.rb 383 B

123456789101112131415
  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. expires_in 3.days, public: true
  9. render content_type: 'application/xrd+xml', formats: [:xml]
  10. end
  11. end
  12. end