summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-10-06 22:11:29 +0200
committerGitHub <noreply@github.com>2019-10-06 22:11:29 +0200
commita58218562555c32bd0ec6c2ca2cc19ac4984904c (patch)
tree7fbc2e26622b0ad0ed1ddebf3cbae29be64e1166
parentf665901e3c0930fb8b3741f6bc6f6a15dd0343f6 (diff)
Fix `GET /api/v1/instance` REST APIs being unavailable in secure mode (#12089)
-rw-r--r--app/controllers/api/v1/instances/activity_controller.rb1
-rw-r--r--app/controllers/api/v1/instances/peers_controller.rb1
-rw-r--r--app/controllers/api/v1/instances_controller.rb1
3 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/api/v1/instances/activity_controller.rb b/app/controllers/api/v1/instances/activity_controller.rb
index 4fb5a69d8b9..b30e8464c3e 100644
--- a/app/controllers/api/v1/instances/activity_controller.rb
+++ b/app/controllers/api/v1/instances/activity_controller.rb
@@ -4,6 +4,7 @@ class Api::V1::Instances::ActivityController < Api::BaseController
before_action :require_enabled_api!
skip_before_action :set_cache_headers
+ skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
respond_to :json
diff --git a/app/controllers/api/v1/instances/peers_controller.rb b/app/controllers/api/v1/instances/peers_controller.rb
index 75c3cb4ba81..cc00d8a6bc3 100644
--- a/app/controllers/api/v1/instances/peers_controller.rb
+++ b/app/controllers/api/v1/instances/peers_controller.rb
@@ -4,6 +4,7 @@ class Api::V1::Instances::PeersController < Api::BaseController
before_action :require_enabled_api!
skip_before_action :set_cache_headers
+ skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
respond_to :json
diff --git a/app/controllers/api/v1/instances_controller.rb b/app/controllers/api/v1/instances_controller.rb
index 8d8231423ec..c323b60b429 100644
--- a/app/controllers/api/v1/instances_controller.rb
+++ b/app/controllers/api/v1/instances_controller.rb
@@ -4,6 +4,7 @@ class Api::V1::InstancesController < Api::BaseController
respond_to :json
skip_before_action :set_cache_headers
+ skip_before_action :require_authenticated_user!, unless: :whitelist_mode?
def show
expires_in 3.minutes, public: true