Displaying 1 result from an estimated 1 matches for "sprockets_headers".
2012 Dec 18
2
cache-busting non-digest assets in sprockets in development a good idea? should headers in sprockets be configurable?
...app to override the
Cache-Control header for html assets that we need to tweak more often in
development, but that we don''t want to use digests/fingerprinting with:
# Sprockets 2.x patch
if Rails.env.development?
module Sprockets
module Server
private
alias_method :sprockets_headers, :headers
def headers(env, asset, length)
sprockets_headers(env, asset, length).tap do |headers|
# cache-bust .html assets because in our case they are frequently
AngularJS templates we need to tweak
if !path_fingerprint(env["PATH_INFO"]) &&
as...