Created
March 28, 2017 00:16
-
-
Save typeoneerror/eeb3512d81d6357ce3f5e6ee8c7debae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sidekiq/web' | |
redis_options = { url: ENV['REDIS_URL'] } | |
Sidekiq.configure_server do |config| | |
config.redis = redis_options | |
end | |
Sidekiq.configure_client do |config| | |
config.redis = redis_options | |
end | |
Sidekiq::Web.use(Rack::Auth::Basic) do |username, password| | |
sidekiq_username = Rails.application.secrets.sidekiq_username || 'admin' | |
[username, password] == [sidekiq_username, Rails.application.secrets.sidekiq_password] | |
end unless Rails.env.development? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment