FEATURE: add a header to denote an anonymous req was cached

(X-Discourse-Cached)
This commit is contained in:
Sam 2015-06-16 10:30:06 +10:00
parent 690f4a4c37
commit 1f9761e85d

View file

@ -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