about summary refs log tree commit diff
path: root/app/controllers/api/v1/instances
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 /app/controllers/api/v1/instances
parentf665901e3c0930fb8b3741f6bc6f6a15dd0343f6 (diff)
Fix `GET /api/v1/instance` REST APIs being unavailable in secure mode (#12089)
Diffstat (limited to 'app/controllers/api/v1/instances')
-rw-r--r--app/controllers/api/v1/instances/activity_controller.rb1
-rw-r--r--app/controllers/api/v1/instances/peers_controller.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/api/v1/instances/activity_controller.rb b/app/controllers/api/v1/instances/activity_controller.rb
index 4fb5a69d8..b30e8464c 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 75c3cb4ba..cc00d8a6b 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