Skip to content

Commit

Permalink
Allow over 32 chars length hash digest
Browse files Browse the repository at this point in the history
Sprockets 3 appends 64 chars length digest.

> Default digest changed to SHA256.

see: https://github.com/rails/sprockets/tree/v3.0.0#version-history
  • Loading branch information
tricknotes committed Aug 19, 2015
1 parent 051c384 commit 05eb515
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/asset_sync/storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def upload_file(f)
:content_type => mime
}

if /-[0-9a-fA-F]{32}$/.match(File.basename(f,File.extname(f)))
if /-[0-9a-fA-F]{32,}$/.match(File.basename(f,File.extname(f)))
file.merge!({
:cache_control => "public, max-age=#{one_year}",
:expires => CGI.rfc1123_date(Time.now + one_year)
Expand Down

0 comments on commit 05eb515

Please sign in to comment.