@@ -81,7 +81,8 @@ def option_name(key)
81
81
# Set of response headers that are removed before storing them in the
82
82
# cache. These headers are only removed for cacheable responses. For
83
83
# example, in most cases, it makes sense to prevent cookies from being
84
- # stored in the cache.
84
+ # stored in the cache. It may also be useful to ignore X-Content-Digest
85
+ # if Rack::Cache is talking to another app that sets it.
85
86
#
86
87
# Default: ['Set-Cookie']
87
88
option_accessor :ignore_headers
@@ -109,6 +110,9 @@ def option_name(key)
109
110
# be used.
110
111
option_accessor :use_native_ttl
111
112
113
+ # Specifies whether Rack::Cache should return an X-Content-Digest header
114
+ option_accessor :disable_digest_header
115
+
112
116
# The underlying options Hash. During initialization (or outside of a
113
117
# request), this is a default values Hash. During a request, this is the
114
118
# Rack environment Hash. The default values Hash is merged in underneath
@@ -151,6 +155,7 @@ def initialize_options(options={})
151
155
'rack-cache.allow_reload' => false ,
152
156
'rack-cache.allow_revalidate' => false ,
153
157
'rack-cache.use_native_ttl' => false ,
158
+ 'rack-cache.disable_digest_header' => false ,
154
159
}
155
160
self . options = options
156
161
end
0 commit comments