Skip to content

Commit

Permalink
Merge pull request #295 from goinvo/fermion/couple-small-things
Browse files Browse the repository at this point in the history
Couple small things
  • Loading branch information
fermion authored Sep 6, 2024
2 parents f8eadab + 4bd4021 commit be88e62
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
8 changes: 7 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

Rails.application.routes.draw do
# TODO: some kind of auth here
mount Sidekiq::Web => '/sidekiq'
mount Sidekiq::Web => '/sidekiq', constraints: lambda { |request|
user = Passwordless::Session.find_by(id: request.session[:"passwordless_session_id--user"])&.authenticatable

Rails.env.development? || (
user && %w(goinvo.com prettygood.software).include?(user.email.split('@').last)
)
}

mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.env.development?

Expand Down
2 changes: 1 addition & 1 deletion db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3"
services:
db:
image: postgres:15
Expand Down

0 comments on commit be88e62

Please sign in to comment.