mirror of
https://github.com/discourse/discourse.git
synced 2025-01-30 22:04:18 +08:00
DEV: improve comment explaining need for favicon proxy
This commit is contained in:
parent
9e50813252
commit
14911d50a1
|
@ -103,12 +103,17 @@ class StaticController < ApplicationController
|
||||||
|
|
||||||
FAVICON ||= -"favicon"
|
FAVICON ||= -"favicon"
|
||||||
|
|
||||||
# We need to be able to draw our favicon on a canvas
|
# We need to be able to draw our favicon on a canvas, this happens when you enable the feature
|
||||||
# and pull it off the canvas into a data uri
|
# that draws the notification count on top of favicon (per user default off)
|
||||||
# This can work by ensuring people set all the right CORS
|
#
|
||||||
# settings in the CDN asset, BUT its annoying and error prone
|
# With s3 the original upload is going to be stored at s3, we don't have a local copy of the favicon.
|
||||||
# instead we cache the favicon in redis and serve it out real quick with
|
# To allow canvas to work with s3 we are going to need to add special CORS headers and use
|
||||||
# a huge expiry, we also cache these assets in nginx so it bypassed if needed
|
# a special crossorigin hint on the original, this is not easily workable.
|
||||||
|
#
|
||||||
|
# Forcing all consumers to set magic CORS headers on a CDN is also not workable for us.
|
||||||
|
#
|
||||||
|
# So we cache the favicon in redis and serve it out real quick with
|
||||||
|
# a huge expiry, we also cache these assets in nginx so it is bypassed if needed
|
||||||
def favicon
|
def favicon
|
||||||
is_asset_path
|
is_asset_path
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user