Created
June 18, 2020 15:01
-
-
Save josedulanto/401e29b5b371ad6c341b439c7cda4efc to your computer and use it in GitHub Desktop.
Revisions
-
josedulanto created this gist
Jun 18, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ # Adds Sidekiq web admin to Rails API only with basic auth and custom URL Sidekiq::Web.use(Rack::Auth::Basic) do |username, password| username == Rails.application.credentials[Rails.env.to_sym][:sidekiqweb][:username] && password == Rails.application.credentials[Rails.env.to_sym][:sidekiqweb][:password] end mount(Sidekiq::Web => "/#{Time.now.strftime("%Y%m%d")}sidekiqadmin")