From e93dd123ccee39b4d4f66243f5e43c072c446f30 Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Mon, 19 Feb 2024 11:33:53 +0900 Subject: [PATCH 1/2] Allow instance API without auth on limited federation mode --- app/controllers/api/v1/instances_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v1/instances_controller.rb b/app/controllers/api/v1/instances_controller.rb index df4a14af156..3ccc7fe6177 100644 --- a/app/controllers/api/v1/instances_controller.rb +++ b/app/controllers/api/v1/instances_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class Api::V1::InstancesController < Api::BaseController - skip_before_action :require_authenticated_user!, unless: :limited_federation_mode? + skip_before_action :require_authenticated_user! skip_around_action :set_locale vary_by '' From 9af4441e17533775057641ab46cbf5452c22ac75 Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Mon, 19 Feb 2024 13:36:49 +0900 Subject: [PATCH 2/2] Also allow api/v1/instance/extended_descriptions --- .../api/v1/instances/extended_descriptions_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/api/v1/instances/extended_descriptions_controller.rb b/app/controllers/api/v1/instances/extended_descriptions_controller.rb index 73d2248117d..34131f90dca 100644 --- a/app/controllers/api/v1/instances/extended_descriptions_controller.rb +++ b/app/controllers/api/v1/instances/extended_descriptions_controller.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true class Api::V1::Instances::ExtendedDescriptionsController < Api::V1::Instances::BaseController + skip_before_action :require_authenticated_user! skip_around_action :set_locale before_action :set_extended_description