2017-04-29 15:23:45 -07:00
|
|
|
# frozen_string_literal: true
|
2017-04-13 04:09:07 -07:00
|
|
|
|
|
|
|
module WellKnown
|
2017-12-27 09:21:12 -08:00
|
|
|
class HostMetaController < ActionController::Base
|
2017-06-02 13:21:36 -07:00
|
|
|
include RoutingHelper
|
|
|
|
|
2017-12-27 09:21:12 -08:00
|
|
|
before_action { response.headers['Vary'] = 'Accept' }
|
|
|
|
|
2017-04-13 04:09:07 -07:00
|
|
|
def show
|
|
|
|
@webfinger_template = "#{webfinger_url}?resource={uri}"
|
2019-07-08 03:03:45 -07:00
|
|
|
expires_in 3.days, public: true
|
2020-01-02 20:28:56 -08:00
|
|
|
render content_type: 'application/xrd+xml', formats: [:xml]
|
2017-04-13 04:09:07 -07:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|