From 137100dcf38c0da0fe7044a4c92aa06eae02c420 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 13 Apr 2017 07:09:07 -0400 Subject: Clean up well-known routes/controllers (#1649) * Add request spec for host meta route returning xml * Add routing spec for xrd routes * Update well-known routes * Move webfinger and host-meta actions to their own controllers --- app/controllers/well_known/host_meta_controller.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 app/controllers/well_known/host_meta_controller.rb (limited to 'app/controllers/well_known/host_meta_controller.rb') diff --git a/app/controllers/well_known/host_meta_controller.rb b/app/controllers/well_known/host_meta_controller.rb new file mode 100644 index 000000000..2f0960acd --- /dev/null +++ b/app/controllers/well_known/host_meta_controller.rb @@ -0,0 +1,13 @@ + # frozen_string_literal: true + +module WellKnown + class HostMetaController < ApplicationController + def show + @webfinger_template = "#{webfinger_url}?resource={uri}" + + respond_to do |format| + format.xml { render content_type: 'application/xrd+xml' } + end + end + end +end -- cgit