lib/onebox/helpers.rb in onebox-2.2.14 vs lib/onebox/helpers.rb in onebox-2.2.15

- old
+ new

@@ -88,10 +88,11 @@ redir_header = nil unless redir_header.is_a? Hash code = response.code.to_i unless code === 200 - response.error! unless [301, 302].include?(code) + response.error! unless [301, 302, 303, 307, 308].include?(code) + return fetch_response( response['location'], redirect_limit: redirect_limit - 1, domain: "#{uri.scheme}://#{uri.host}", headers: redir_header