diff --git a/app/controllers/api/v1/timelines/public_controller.rb b/app/controllers/api/v1/timelines/public_controller.rb index d0aaf5ee802626..0d3913d6decc7c 100644 --- a/app/controllers/api/v1/timelines/public_controller.rb +++ b/app/controllers/api/v1/timelines/public_controller.rb @@ -14,11 +14,14 @@ def show private def require_auth? - !Setting.timeline_preview - if truthy_param?(:local) - !Setting.timeline_preview_local - elsif truthy_param?(:remote) - !Setting.timeline_preview_remote + if !Setting.timeline_preview + if truthy_param?(:local) + !Setting.timeline_preview_local + elsif truthy_param?(:remote) + !Setting.timeline_preview_remote + end + else + !Setting.timeline_preview end end