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