diff options
author | FChannel <> | 2021-07-07 11:07:51 -0700 |
---|---|---|
committer | FChannel <> | 2021-07-07 11:07:51 -0700 |
commit | ca4444d74d7123edebedb4d7be713f739d2896ab (patch) | |
tree | d9192f8f4fe21a401b81d061b712d4d36900bbf7 /client.go | |
parent | fdefcfa2a98207e670594c5a112503d73739acf5 (diff) |
check if onion link for media proxy
Diffstat (limited to 'client.go')
-rw-r--r-- | client.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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) |