diff --git a/config.ru b/config.ru index f10837ba..c831afe5 100644 --- a/config.ru +++ b/config.ru @@ -1,3 +1,13 @@ require './app.rb' +require 'sidekiq/web' -map('/') { run Sinatra::Application } \ No newline at end of file +map('/') { run Sinatra::Application } + +map '/sidekiq' do + use Rack::Auth::Basic, "Protected Area" do |username, password| + raise 'missing sidekiq auth' unless $config['sidekiq_user'] && $config['sidekiq_pass'] + username == $config['sidekiq_user'] && password == $config['sidekiq_pass'] + end + + run Sidekiq::Web +end diff --git a/config.yml.template b/config.yml.template index 09569639..140f6d09 100644 --- a/config.yml.template +++ b/config.yml.template @@ -4,5 +4,7 @@ development: session_secret: SECRET GOES HERE recaptcha_public_key: ENTER PUBLIC KEY HERE recaptcha_private_key: ENTER PRIVATE KEY HERE + sidekiq_user: ENTER USER HERE + sidekiq_pass: ENTER PASS HERE phantomjs_url: - http://localhost:8910 \ No newline at end of file