Skip to content

Commit

Permalink
Add info how to setup basic auth for engine
Browse files Browse the repository at this point in the history
  • Loading branch information
morgoth committed Sep 25, 2020
1 parent 56e54fd commit 0608cf2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,16 @@ GoodJob includes a Dashboard as a mountable `Rails::Engine`.
end
```
Another option is using basic auth like this:
```ruby
# config/initializers/good_job.rb
GoodJob::Engine.middleware.use(Rack::Auth::Basic) do |username, password|
ActiveSupport::SecurityUtils.secure_compare(Rails.application.credentials.good_job_username, username) &&
ActiveSupport::SecurityUtils.secure_compare(Rails.application.credentials.good_job_password, password)
end
```
## Go deeper
### Exceptions, retries, and reliability
Expand Down

0 comments on commit 0608cf2

Please sign in to comment.