Skip to content

Instantly share code, notes, and snippets.

@amitpatelx
Created August 31, 2016 10:23
Show Gist options
  • Save amitpatelx/29b7bde94be4015746ab770840b86c96 to your computer and use it in GitHub Desktop.
Save amitpatelx/29b7bde94be4015746ab770840b86c96 to your computer and use it in GitHub Desktop.
Configure Sidekiq web interface
require 'sidekiq/web'
Sidekiq::Web.use Rack::Auth::Basic do |username, password|
username == ENV["SIDEKIQ_USERNAME"] && password == ENV["SIDEKIQ_PASSWORD"]
end if Rails.env.production?
mount Sidekiq::Web => '/sidekiq'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment