File tree Expand file tree Collapse file tree 4 files changed +39
-16
lines changed Expand file tree Collapse file tree 4 files changed +39
-16
lines changed Original file line number Diff line number Diff line change @@ -100,8 +100,8 @@ gem 'word_count_analyzer'
100
100
gem 'will_paginate' , '~> 4.0'
101
101
102
102
# Workers
103
- gem 'sidekiq' , '~> 5.2.7 '
104
- gem 'redis' , '~> 4.8.1 '
103
+ gem 'sidekiq' , '~> 7.3.9 '
104
+ gem 'redis' , '~> 5.1.0 '
105
105
106
106
# Exports
107
107
gem 'csv'
Original file line number Diff line number Diff line change @@ -2050,9 +2050,6 @@ GEM
2050
2050
rack (2.2.13 )
2051
2051
rack-mini-profiler (3.3.1 )
2052
2052
rack (>= 1.2.0 )
2053
- rack-protection (3.2.0 )
2054
- base64 (>= 0.1.0 )
2055
- rack (~> 2.2 , >= 2.2.4 )
2056
2053
rack-proxy (0.7.7 )
2057
2054
rack
2058
2055
rack-test (2.2.0 )
@@ -2112,7 +2109,10 @@ GEM
2112
2109
railties (>= 3.2 )
2113
2110
tilt
2114
2111
redcarpet (3.6.1 )
2115
- redis (4.8.1 )
2112
+ redis (5.1.0 )
2113
+ redis-client (>= 0.17.0 )
2114
+ redis-client (0.24.0 )
2115
+ connection_pool
2116
2116
responders (3.1.1 )
2117
2117
actionpack (>= 5.2 )
2118
2118
railties (>= 5.2 )
@@ -2158,11 +2158,12 @@ GEM
2158
2158
sentry-ruby (5.23.0 )
2159
2159
bigdecimal
2160
2160
concurrent-ruby (~> 1.0 , >= 1.0.2 )
2161
- sidekiq (5.2.7 )
2162
- connection_pool (~> 2.2 , >= 2.2.2 )
2163
- rack (>= 1.5.0 )
2164
- rack-protection (>= 1.5.0 )
2165
- redis (>= 3.3.5 , < 5 )
2161
+ sidekiq (7.3.9 )
2162
+ base64
2163
+ connection_pool (>= 2.3.0 )
2164
+ logger
2165
+ rack (>= 2.2.4 )
2166
+ redis-client (>= 0.22.2 )
2166
2167
simplecov (0.13.0 )
2167
2168
docile (~> 1.1.0 )
2168
2169
json (>= 1.8 , < 3 )
@@ -2296,14 +2297,14 @@ DEPENDENCIES
2296
2297
rails_admin
2297
2298
react-rails
2298
2299
redcarpet
2299
- redis (~> 4.8.1 )
2300
+ redis (~> 5.1.0 )
2300
2301
rmagick
2301
2302
sass-rails
2302
2303
selenium-webdriver
2303
2304
sentry-rails
2304
2305
sentry-ruby
2305
2306
serendipitous !
2306
- sidekiq (~> 5.2.7 )
2307
+ sidekiq (~> 7.3.9 )
2307
2308
slack-notifier
2308
2309
spring
2309
2310
sprockets (~> 4.2.0 )
Original file line number Diff line number Diff line change
1
+ # Sidekiq configuration for version 7+
2
+ Sidekiq . configure_server do |config |
3
+ config . redis = { url : ENV . fetch ( 'REDIS_URL' , 'redis://localhost:6379/1' ) }
4
+ end
5
+
6
+ Sidekiq . configure_client do |config |
7
+ config . redis = { url : ENV . fetch ( 'REDIS_URL' , 'redis://localhost:6379/1' ) }
8
+ end
9
+
10
+ # Sidekiq Web UI setup
11
+ require 'sidekiq/web'
12
+
13
+ # Configure Web UI
14
+ Sidekiq ::Web . app_url = '/' # Set the app URL for navigation
Original file line number Diff line number Diff line change 452
452
453
453
mount StripeEvent ::Engine , at : '/webhooks/stripe'
454
454
455
+ # Sidekiq Web UI with authentication for v7+
455
456
require 'sidekiq/web'
456
- authenticate :user , lambda { |u | u . site_administrator? } do
457
- mount Sidekiq ::Web => '/sidekiq'
458
- end
457
+
458
+ # Use Devise authentication constraint
459
+ Sidekiq ::Web . use Rack ::Auth ::Basic do |username , password |
460
+ # Protect with simple authentication until we can fix proper user-based auth
461
+ # This is a temporary solution until we update the authentication to use ActiveSupport::SecurityUtils
462
+ ActiveSupport ::SecurityUtils . secure_compare ( ::Digest ::SHA256 . hexdigest ( username ) , ::Digest ::SHA256 . hexdigest ( ENV [ 'SIDEKIQ_USERNAME' ] || 'admin' ) ) &
463
+ ActiveSupport ::SecurityUtils . secure_compare ( ::Digest ::SHA256 . hexdigest ( password ) , ::Digest ::SHA256 . hexdigest ( ENV [ 'SIDEKIQ_PASSWORD' ] || 'password' ) )
464
+ end unless Rails . env . development?
465
+
466
+ mount Sidekiq ::Web => '/sidekiq'
459
467
460
468
# Promos and other temporary pages
461
469
get '/redeem/infostack' , to : 'main#infostack'
You can’t perform that action at this time.
0 commit comments