FEATURE: add a header to denote an anonymous req was cached
(X-Discourse-Cached)
This commit is contained in:
parent
690f4a4c37
commit
1f9761e85d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue