From ca4444d74d7123edebedb4d7be713f739d2896ab Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Wed, 7 Jul 2021 11:07:51 -0700 Subject: check if onion link for media proxy --- client.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client.go b/client.go index 5ac527e..de0168f 100644 --- a/client.go +++ b/client.go @@ -583,6 +583,12 @@ func MediaProxy(url string) string { if re.MatchString(url) { return url } + + re = regexp.MustCompile("(.+)?\\.onion(.+)?") + + if re.MatchString(url) { + return url + } MediaHashs[HashMedia(url)] = url return "/api/media?hash=" + HashMedia(url) -- cgit v1.2.3