mirror of https://github.com/docusealco/docuseal
				
				
				
			
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							17 lines
						
					
					
						
							377 B
						
					
					
				
			
		
		
	
	
							17 lines
						
					
					
						
							377 B
						
					
					
				| # 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
 |