Skip to content

Commit

Permalink
Merge pull request #3937 from pulibrary/fix-cas-login-for-devs
Browse files Browse the repository at this point in the history
Fix CAS Login for local development
  • Loading branch information
regineheberlein authored Jan 13, 2024
2 parents 13f40b6 + 899e0f3 commit d4bc0d7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion config/initializers/cookies_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@
# Be sure to restart your server when you modify this file.

Rails.application.config.action_dispatch.cookies_serializer = :json
Rails.application.config.action_dispatch.cookies_same_site_protection = :strict

# Strict Same Site Protection protects users from CSRF attacks from non-Princeton
# domains. However, when running orangelight on localhost, the CAS login page is
# on a different domain from orangelight (localhost vs. *.princeton.edu), so
# we exclude the dev environment from these protections so they can use CAS locally.
Rails.application.config.action_dispatch.cookies_same_site_protection = :strict unless Rails.env.development?

0 comments on commit d4bc0d7

Please sign in to comment.