mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
DEV: Introduce DISCOURSE_ASSET_URL_SALT
(#24596)
This value is included when generating static asset URLs. Updating the value will allow site operators to invalidate all asset urls to recover from configuration issues which may have been cached by CDNs/browsers.
This commit is contained in:
@ -22,7 +22,8 @@ class JavascriptCache < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def update_digest
|
||||
self.digest = Digest::SHA1.hexdigest(content) if content_changed?
|
||||
self.digest =
|
||||
Digest::SHA1.hexdigest("#{content}|#{GlobalSetting.asset_url_salt}") if content_changed?
|
||||
end
|
||||
|
||||
def content_cannot_be_nil
|
||||
|
Reference in New Issue
Block a user