FEATURE: add immutable caching to rails site of things

This commit is contained in:
Sam
2017-02-23 13:05:00 -05:00
parent eee22bf037
commit f15f61da0a
6 changed files with 16 additions and 10 deletions

View File

@ -20,7 +20,7 @@ class HighlightJsController < ApplicationController
response.headers["Last-Modified"] = 10.years.ago.httpdate
response.headers["Content-Length"] = highlight_js.bytesize.to_s
expires_in 1.year, public: true
immutable_for 1.year
render text: highlight_js, disposition: nil, content_type: 'application/javascript'
end