mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: dev subfolder session cookies (#16031)
rack-mini-profiler was setting a cookie path of / which was clobbering the session cookie path of Discourse.base_path. Fixes some issues when local dev is unable to read or write from/to the user session, such as during omniauth CSRF checks.
This commit is contained in:
parent
cd6b7459a7
commit
9c50c69bd2
@ -314,7 +314,7 @@ GEM
|
|||||||
r2 (0.2.7)
|
r2 (0.2.7)
|
||||||
racc (1.6.0)
|
racc (1.6.0)
|
||||||
rack (2.2.3)
|
rack (2.2.3)
|
||||||
rack-mini-profiler (2.3.3)
|
rack-mini-profiler (2.3.4)
|
||||||
rack (>= 1.2.0)
|
rack (>= 1.2.0)
|
||||||
rack-protection (2.2.0)
|
rack-protection (2.2.0)
|
||||||
rack
|
rack
|
||||||
|
@ -68,6 +68,10 @@ if defined?(Rack::MiniProfiler) && defined?(Rack::MiniProfiler::Config)
|
|||||||
Digest::MD5.hexdigest(id)
|
Digest::MD5.hexdigest(id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Cookie path should be set to the base path so Discourse's session cookie path
|
||||||
|
# does not get clobbered.
|
||||||
|
Rack::MiniProfiler.config.cookie_path = Discourse.base_path
|
||||||
|
|
||||||
Rack::MiniProfiler.config.position = 'left'
|
Rack::MiniProfiler.config.position = 'left'
|
||||||
Rack::MiniProfiler.config.backtrace_ignores ||= []
|
Rack::MiniProfiler.config.backtrace_ignores ||= []
|
||||||
Rack::MiniProfiler.config.backtrace_ignores << /lib\/rack\/message_bus.rb/
|
Rack::MiniProfiler.config.backtrace_ignores << /lib\/rack\/message_bus.rb/
|
||||||
|
Loading…
Reference in New Issue
Block a user