mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
PERF: avoid cookies for all static, public, cached forever assets
This commit is contained in:
parent
e59d5fd0eb
commit
fe46d1dd3b
5 changed files with 20 additions and 0 deletions
|
@ -24,6 +24,8 @@ class UserAvatarsController < ApplicationController
|
|||
params.require(:version)
|
||||
params.require(:size)
|
||||
|
||||
no_cookies
|
||||
|
||||
return render_dot if params[:version] != LetterAvatar.version
|
||||
|
||||
image = LetterAvatar.generate(params[:username].to_s, params[:size].to_i)
|
||||
|
@ -35,6 +37,9 @@ class UserAvatarsController < ApplicationController
|
|||
end
|
||||
|
||||
def show
|
||||
|
||||
no_cookies
|
||||
|
||||
# we need multisite support to keep a single origin pull for CDNs
|
||||
RailsMultisite::ConnectionManagement.with_hostname(params[:hostname]) do
|
||||
show_in_site(RailsMultisite::ConnectionManagement.current_hostname)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue