mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 13:58:01 +08:00
FEATURE: add a header to denote an anonymous req was cached
(X-Discourse-Cached)
This commit is contained in:
@ -89,6 +89,7 @@ module Middleware
|
||||
|
||||
if status == 200 && cache_duration
|
||||
headers_stripped = headers.dup.delete_if{|k, _| ["Set-Cookie","X-MiniProfiler-Ids"].include? k}
|
||||
headers_stripped["X-Discourse-Cached"] = "true"
|
||||
parts = []
|
||||
response.each do |part|
|
||||
parts << part
|
||||
|
Reference in New Issue
Block a user