DEV: Switch letter avatar service to new domain (#10546)
This commit is contained in:
parent
a51db9a7bf
commit
89cb537fae
|
@ -46,7 +46,7 @@ class UserAvatarsController < ApplicationController
|
|||
|
||||
hijack do
|
||||
begin
|
||||
proxy_avatar("https://avatars.discourse.org/#{params[:version]}/letter/#{params[:letter]}/#{params[:color]}/#{params[:size]}.png", Time.new('1990-01-01'))
|
||||
proxy_avatar("https://avatars.discourse-cdn.com/#{params[:version]}/letter/#{params[:letter]}/#{params[:color]}/#{params[:size]}.png", Time.new('1990-01-01'))
|
||||
rescue OpenURI::HTTPError
|
||||
render_blank
|
||||
end
|
||||
|
|
|
@ -12,7 +12,7 @@ describe UserAvatarsController do
|
|||
end
|
||||
|
||||
it 'returns an avatar if we are allowing the proxy' do
|
||||
stub_request(:get, "https://avatars.discourse.org/v3/letter/a/aaaaaa/360.png").to_return(body: 'image')
|
||||
stub_request(:get, "https://avatars.discourse-cdn.com/v3/letter/a/aaaaaa/360.png").to_return(body: 'image')
|
||||
get "/letter_avatar_proxy/v3/letter/a/aaaaaa/360.png"
|
||||
expect(response.status).to eq(200)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue