mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
FEATURE: add a header to denote an anonymous req was cached
(X-Discourse-Cached)
This commit is contained in:
parent
690f4a4c37
commit
1f9761e85d
1 changed files with 1 additions and 0 deletions
|
@ -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 a new issue