diff options
author | Matt Jankowski <mjankowski@thoughtbot.com> | 2017-04-12 10:03:37 -0400 |
---|---|---|
committer | Eugen <eugen@zeonfederated.com> | 2017-04-12 16:03:37 +0200 |
commit | b352a8e5d4f3dba4b923a2a21dc9ae5343e7e8e4 (patch) | |
tree | 6fab1683ceda218fdf8639a7967e092ba50ff03c /app | |
parent | fd102059aa63a3953ccfedfe9efa0e6f7993f72a (diff) |
Default to json type for webfinger requests (#1583)
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/xrd_controller.rb | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/app/controllers/xrd_controller.rb b/app/controllers/xrd_controller.rb index 5964172e9..ba5032abd 100644 --- a/app/controllers/xrd_controller.rb +++ b/app/controllers/xrd_controller.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true class XrdController < ApplicationController - before_action :set_default_format_json, only: :webfinger before_action :set_default_format_xml, only: :host_meta def host_meta @@ -31,10 +30,6 @@ class XrdController < ApplicationController request.format = 'xml' if request.headers['HTTP_ACCEPT'].nil? && params[:format].nil? end - def set_default_format_json - request.format = 'json' if request.headers['HTTP_ACCEPT'].nil? && params[:format].nil? - end - def username_from_resource if resource_param =~ /\Ahttps?:\/\// path_params = Rails.application.routes.recognize_path(resource_param) |