Sidekiq route behind superadmin authentication
This commit is contained in:
parent
24d17dc0f3
commit
700372231d
1 changed files with 7 additions and 4 deletions
|
@ -42,9 +42,13 @@ Rails.application.routes.draw do
|
||||||
get 'admin' => 'admin#index'
|
get 'admin' => 'admin#index'
|
||||||
get 'backoffice' => 'backoffice#index'
|
get 'backoffice' => 'backoffice#index'
|
||||||
|
|
||||||
resources :administrations, only: [:index, :create]
|
authenticate :administration do
|
||||||
namespace :administrations do
|
resources :administrations, only: [:index, :create]
|
||||||
resources :stats, only: [:index]
|
namespace :administrations do
|
||||||
|
resources :stats, only: [:index]
|
||||||
|
|
||||||
|
mount Sidekiq::Web => '/sidekiq'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
namespace :france_connect do
|
namespace :france_connect do
|
||||||
|
@ -209,7 +213,6 @@ Rails.application.routes.draw do
|
||||||
|
|
||||||
require 'sidekiq/web'
|
require 'sidekiq/web'
|
||||||
require 'sidekiq/cron/web'
|
require 'sidekiq/cron/web'
|
||||||
mount Sidekiq::Web => '/sidekiq' # , constraints: lambda { |request| User::is_admin_from_request(request) }
|
|
||||||
|
|
||||||
apipie
|
apipie
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue