mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 21:11:10 +08:00
FIX: specify path for dosp cookie
This commit is contained in:
@ -201,7 +201,7 @@ module Middleware
|
|||||||
end
|
end
|
||||||
|
|
||||||
if force_anon
|
if force_anon
|
||||||
result[1]["Set-Cookie"] = "dosp=1"
|
result[1]["Set-Cookie"] = "dosp=1; Path=/"
|
||||||
end
|
end
|
||||||
|
|
||||||
result
|
result
|
||||||
|
@ -94,7 +94,7 @@ describe Middleware::AnonymousCache::Helper do
|
|||||||
is_anon = false
|
is_anon = false
|
||||||
_status, headers, _body = app.call(env.dup)
|
_status, headers, _body = app.call(env.dup)
|
||||||
expect(is_anon).to eq(true)
|
expect(is_anon).to eq(true)
|
||||||
expect(headers['Set-Cookie']).to eq('dosp=1')
|
expect(headers['Set-Cookie']).to eq('dosp=1; Path=/')
|
||||||
|
|
||||||
# tricky change, a 50ms delay still will trigger protection
|
# tricky change, a 50ms delay still will trigger protection
|
||||||
# once it is tripped
|
# once it is tripped
|
||||||
|
Reference in New Issue
Block a user