Skip to content

Commit b00e546

Browse files
committed
Expose same_site instance variable. Fixes #2.
1 parent 8a4a5f3 commit b00e546

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/rack/session/abstract/id.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ class Persisted
250250
secure_random: ::SecureRandom
251251
}.freeze
252252

253-
attr_reader :key, :default_options, :sid_secure
253+
attr_reader :key, :default_options, :sid_secure, :same_site
254254

255255
def initialize(app, options = {})
256256
@app = app

test/spec_session_pool.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@
203203

204204
it "passes through same_site option to session pool" do
205205
pool = Rack::Session::Pool.new(incrementor, same_site: :none)
206+
pool.same_site.must_equal :none
206207
req = Rack::MockRequest.new(pool)
207208
res = req.get("/")
208209
res["Set-Cookie"].must_include "SameSite=None"

0 commit comments

Comments
 (0)