From 1768c45a335ae50b4ff5607ef1cdab88428a5211 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 4 May 2017 12:42:46 -0400 Subject: [PATCH] FIX: If we can't proxy to a CDN due to HTTP error, render blank --- app/controllers/user_avatars_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/user_avatars_controller.rb b/app/controllers/user_avatars_controller.rb index de49789cb6c..73c89ac04e6 100644 --- a/app/controllers/user_avatars_controller.rb +++ b/app/controllers/user_avatars_controller.rb @@ -117,6 +117,8 @@ class UserAvatarsController < ApplicationController else render_blank end + rescue OpenURI::HTTPError + render_blank end PROXY_PATH = Rails.root + "tmp/avatar_proxy"