PERF: use CDN url for proxy of favicon

PERF: use CDN url for proxy of favicon

This avoids hitting S3 direct which is usually not desirable.

diff --git a/app/controllers/static_controller.rb b/app/controllers/static_controller.rb
index d884404..b546c2b 100644
--- a/app/controllers/static_controller.rb
+++ b/app/controllers/static_controller.rb
@@ -135,7 +135,7 @@ class StaticController < ApplicationController
         if Discourse.store.external?
           begin
             file = FileHelper.download(
-              UrlHelper.absolute(favicon.url),
+              Discourse.store.cdn_url(favicon.url),
               max_file_size: favicon.filesize,
               tmp_file_name: FAVICON,
               follow_redirect: true

GitHub sha: 213117b8

2 Likes