mirror of
https://github.com/docusealco/docuseal
synced 2026-11-10 23:42:32 -05:00
add optional sidekiq for background jobs
This commit is contained in:
1 parent
6f3fe1dd7b
commit
7ed1b71a6b
7 files changed
+36
No files matched your search
@@ -0,0 +1,16 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
if defined?(Sidekiq)
|
||||
require 'sidekiq/web'
|
||||
|
||||
Sidekiq::Web.use(Rack::Auth::Basic) do |_, password|
|
||||
next true if Rails.env.development?
|
||||
|
||||
ActiveSupport::SecurityUtils.secure_compare(
|
||||
Digest::SHA256.hexdigest(password),
|
||||
Digest::SHA256.hexdigest(ENV.fetch('SIDEKIQ_BASIC_AUTH_PASSWORD'))
|
||||
)
|
||||
end
|
||||
|
||||
Sidekiq.strict_args!
|
||||
end
|
||||
Reference in new issue
Block a user