Skip to content

Commit

Permalink
Revert "Fix CAS Login for local development" (#3949)
Browse files Browse the repository at this point in the history
* Revert "Fix CAS Login for local development"

* Remove cookie sameSite strict

Co-authored-by: Jane Sandberg <[email protected]>
Co-authored-by: Kevin Reiss <[email protected]>

---------

Co-authored-by: Jane Sandberg <[email protected]>
Co-authored-by: Kevin Reiss <[email protected]>
  • Loading branch information
3 people authored Jan 24, 2024
1 parent 40372d6 commit 18fd19c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
6 changes: 0 additions & 6 deletions config/initializers/cookies_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,3 @@
# Be sure to restart your server when you modify this file.

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

# 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?
4 changes: 0 additions & 4 deletions spec/requests/cookies_spec.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe 'Cookies' do
it 'sets SameSite=strict' do
get '/'
expect(response.headers['Set-Cookie']).to include('SameSite=Strict')
end
it 'sets HttpOnly' do
get '/'
expect(response.headers['Set-Cookie']).to include('HttpOnly')
Expand Down

0 comments on commit 18fd19c

Please sign in to comment.