Skip to content

Commit d14a1fb

Browse files
committed
Add Sidekiq monitoring
This is password protected using the same basic auth mechanism that we had in place for Good Job.
1 parent bf15568 commit d14a1fb

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

config/routes.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# frozen_string_literal: true
22

3+
require "sidekiq/web"
4+
require "sidekiq/throttled/web"
5+
36
Rails.application.routes.draw do
47
# Redirect www subdomain to root in production envs
58
unless Rails.env.local?
@@ -38,6 +41,18 @@
3841

3942
mount GoodJob::Engine => "/good-job"
4043

44+
Sidekiq::Web.use Rack::Auth::Basic do |username, password|
45+
ActiveSupport::SecurityUtils.secure_compare(
46+
Rails.application.credentials.support_username,
47+
username
48+
) &&
49+
ActiveSupport::SecurityUtils.secure_compare(
50+
Rails.application.credentials.support_password,
51+
password
52+
)
53+
end
54+
mount Sidekiq::Web => "/sidekiq"
55+
4156
get "/start", to: "pages#start"
4257
get "/dashboard", to: "dashboard#index"
4358
get "/accessibility-statement", to: "content#accessibility_statement"

0 commit comments

Comments
 (0)