Restrict image/gif media host instead of hashing

This commit is contained in:
Zed
2019-09-13 12:27:04 +02:00
parent ec43987363
commit 9c91688497
7 changed files with 65 additions and 25 deletions

View File

@@ -32,7 +32,7 @@ proc linkUser*(profile: Profile, class=""): VNode =
proc genImg*(url: string; class=""): VNode =
buildHtml():
img(src=url.getSigUrl("pic"), class=class, alt="Image")
img(src=getPicUrl(url), class=class, alt="Image")
proc linkText*(text: string; class=""): VNode =
let url = if "http" notin text: "http://" & text else: text