mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 08:18:15 +08:00
FIX: Bypass AnonymousCache
for /srv/status
route. (#11491)
`/srv/status` routes should not be cached at all. Also, we want to decouple the route from Redis which `AnonymouseCache` relies on. The `/srv/status` should continue to return a success response even if Redis is down.
This commit is contained in:

committed by
GitHub

parent
89bf64c0bf
commit
38b6b098bc
@ -26,6 +26,10 @@ describe Middleware::AnonymousCache do
|
||||
it "is false if it has an auth cookie" do
|
||||
expect(new_helper("HTTP_COOKIE" => "jack=1; _t=#{"1" * 32}; jill=2").cacheable?).to eq(false)
|
||||
end
|
||||
|
||||
it "is false for srv/status routes" do
|
||||
expect(new_helper("PATH_INFO" => "/srv/status").cacheable?).to eq(false)
|
||||
end
|
||||
end
|
||||
|
||||
context "per theme cache" do
|
||||
|
Reference in New Issue
Block a user