Skip to content

Commit

Permalink
fix: Development logins
Browse files Browse the repository at this point in the history
  • Loading branch information
dougmartin committed Dec 19, 2023
1 parent 18df1de commit c5de9b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rails/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class Application < Rails::Application

# Specify cookies SameSite protection level: either :none, :lax, or :strict.
# When running tests, we want to use lax protection (breaks cucumber tests otherwise)
same_site_protection = (Rails.env.cucumber? || Rails.env.test? || Rails.env.feature_test?) ? :lax : :none
same_site_protection = (Rails.env.development? || Rails.env.cucumber? || Rails.env.test? || Rails.env.feature_test?) ? :lax : :none
config.action_dispatch.cookies_same_site_protection = same_site_protection

# Allow requests from any domain (skips DNS rebinding attack guards)
Expand Down
2 changes: 1 addition & 1 deletion rails/config/initializers/session_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
# (create the session table with "rails generate session_migration")

# For testing environments, we don't use SSL and can't set cookie to secure.
secure = !(Rails.env.cucumber? || Rails.env.test? || Rails.env.feature_test?)
secure = !(Rails.env.development? || Rails.env.cucumber? || Rails.env.test? || Rails.env.feature_test?)
RailsPortal::Application.config.session_store :active_record_store, :key => '_rails_portal_session', secure: secure

0 comments on commit c5de9b8

Please sign in to comment.