From 212959de1048a4ca617aa46c7531ed63d316369d Mon Sep 17 00:00:00 2001 From: ryanzhao Date: Mon, 29 Jun 2020 14:44:12 +1000 Subject: [PATCH 1/2] Drop banned proxy to fix link previews --- .../src/Messages/Interactions/OWSLinkPreview.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SignalServiceKit/src/Messages/Interactions/OWSLinkPreview.swift b/SignalServiceKit/src/Messages/Interactions/OWSLinkPreview.swift index 3096f58ad..fe65b1d01 100644 --- a/SignalServiceKit/src/Messages/Interactions/OWSLinkPreview.swift +++ b/SignalServiceKit/src/Messages/Interactions/OWSLinkPreview.swift @@ -627,7 +627,11 @@ public class OWSLinkPreview: MTLModel { Logger.verbose("url: \(urlString)") - let sessionConfiguration = ContentProxy.sessionConfiguration() + //It seems like Signal's proxy has been banned by Youtube. + //Just comment this out to fix link previews. + //We will move this to onion routing in the future + //let sessionConfiguration = ContentProxy.sessionConfiguration() + let sessionConfiguration = URLSessionConfiguration.ephemeral // Don't use any caching to protect privacy of these requests. sessionConfiguration.requestCachePolicy = .reloadIgnoringLocalCacheData From eb3f26a3db44f57dc2ef3c5f5f76918768d553ab Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Wed, 8 Jul 2020 08:55:46 +1000 Subject: [PATCH 2/2] Reword comment --- .../src/Messages/Interactions/OWSLinkPreview.swift | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/SignalServiceKit/src/Messages/Interactions/OWSLinkPreview.swift b/SignalServiceKit/src/Messages/Interactions/OWSLinkPreview.swift index fe65b1d01..80faf4545 100644 --- a/SignalServiceKit/src/Messages/Interactions/OWSLinkPreview.swift +++ b/SignalServiceKit/src/Messages/Interactions/OWSLinkPreview.swift @@ -627,10 +627,7 @@ public class OWSLinkPreview: MTLModel { Logger.verbose("url: \(urlString)") - //It seems like Signal's proxy has been banned by Youtube. - //Just comment this out to fix link previews. - //We will move this to onion routing in the future - //let sessionConfiguration = ContentProxy.sessionConfiguration() + // let sessionConfiguration = ContentProxy.sessionConfiguration() // Loki: Signal's proxy appears to have been banned by YouTube let sessionConfiguration = URLSessionConfiguration.ephemeral // Don't use any caching to protect privacy of these requests.