Skip to content

Commit

Permalink
Fix sidekiq web UI
Browse files Browse the repository at this point in the history
  • Loading branch information
mjgiarlo committed Apr 2, 2021
1 parent 51f33af commit 705398e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,9 @@ class Application < Rails::Application

# turn off drawing of Active Storage's default routes, we'll add the ones we want
config.active_storage.draw_routes = false

# Set up a session store so we can access the Sidekiq Web UI
# See: https://github.com/mperham/sidekiq/wiki/Monitoring#rails-api-application-session-configuration
config.session_store :cookie_store, key: '_sdr-api_session'
end
end
5 changes: 5 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

require 'sidekiq/web'

# From Sidekiq docs: https://github.com/mperham/sidekiq/wiki/Monitoring#rails-api-application-session-configuration
# Configure Sidekiq-specific session middleware
Sidekiq::Web.use ActionDispatch::Cookies
Sidekiq::Web.use Rails.application.config.session_store, Rails.application.config.session_options

Rails.application.routes.draw do
scope 'v1' do
post '/auth/login', to: 'authentication#login'
Expand Down

0 comments on commit 705398e

Please sign in to comment.