We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent edd5195 commit ca59056Copy full SHA for ca59056
lib/yard/server/commands/base.rb
@@ -183,7 +183,7 @@ def not_found
183
self.body = "Not found: #{request.path}"
184
headers['Content-Type'] = 'text/plain'
185
headers['X-Cascade'] = 'pass'
186
- headers.delete('Cache-Control')
+ headers['Cache-Control'] = 'nocache'
187
end
188
189
# Sets the headers and status code for a redirection to a given URL
@@ -201,7 +201,7 @@ def redirect(url)
201
# requests served with "?1234567890" style timestamp query strings.
202
def add_cache_control
203
return if request.query_string.to_i == 0
204
- headers['Cache-Control'] = 'private, max-age=300'
+ headers['Cache-Control'] ||= 'public, max-age=300'
205
206
207
0 commit comments