Skip to content

Commit e11df74

Browse files
Provide access to sidekiq endpoint only to authenticated admins
1 parent 69b97a6 commit e11df74

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

config/routes.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.application.config.action_mailer.delivery_method == :letter_opener_web
1212

13-
mount Sidekiq::Web => "/sidekiq"
13+
authenticate :user, ->(u) { u.admin? } do
14+
mount Sidekiq::Web => "/sidekiq"
15+
end
1416

1517
resource :system_status, only: :show
1618
resource :newsletter_settings, only: :show

0 commit comments

Comments
 (0)