Created
November 7, 2012 18:39
-
-
Save cheald/4033495 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ASSET_HOSTS = ["https://da950294alksdjfa.cloudfront.net", "https://sa9dfasd0fa9sd.cloudfront.net"] | |
config.action_controller.asset_host = Proc.new {|source, request = nil, *_| | |
index = Digest::SHA1.digest(source)[0].ord % ASSET_HOSTS.length | |
ASSET_HOSTS[index] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment