aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFChannel <>2021-07-07 11:07:51 -0700
committerFChannel <>2021-07-07 11:07:51 -0700
commitca4444d74d7123edebedb4d7be713f739d2896ab (patch)
treed9192f8f4fe21a401b81d061b712d4d36900bbf7
parentfdefcfa2a98207e670594c5a112503d73739acf5 (diff)
check if onion link for media proxy
-rw-r--r--client.go6
1 files changed, 6 insertions, 0 deletions
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)