1
我試圖用Devise保護Sidekiq UI。我正在運行Rails 5.1,Devise 4.3和Sidekiq 5.0。我嘗試了以下職位:Rails 5保護Sidekiq UI
,但我得到了以下錯誤:
Undefined method failure_app for nil:NilClass
我的路線文件看起來像這樣:
Rails.application.routes.draw do
constraint = lambda do |request|
request.env['warden'].authenticate!({ scope: :admin_user })
end
constraints constraint do
mount Sidekiq::Web => '/admin/sidekiq'
end
devise_for :users
resources :users
end
我如何保護Sidekiq UI與設計Rails 5.1?