FIX: StaticController#favicon reads from disk when using local store. (#7160)

Since uploads site settings are now backed by an actual upload, we don't
have to reach over the network just to fetch the favicon. Instead, we
can just read the upload directly from disk.
This commit is contained in:
Guo Xiang Tan
2019-03-14 04:17:36 +08:00
committed by GitHub
parent 4f74210949
commit 1c6a2262b3
3 changed files with 69 additions and 39 deletions

View File

@ -62,10 +62,7 @@ const Discourse = Ember.Application.extend({
@observes("notifyCount")
faviconChanged() {
if (Discourse.User.currentProp("dynamic_favicon")) {
let url = Discourse.SiteSettings.site_favicon_url;
if (/^http/.test(url)) {
url = Discourse.getURL("/favicon/proxied?" + encodeURIComponent(url));
}
const url = Discourse.getURL("/favicon/proxied");
new window.Favcount(url).set(this.get("notifyCount"));
}
},