From c78d2f1d22e49868870166ead4b115731e054b4f Mon Sep 17 00:00:00 2001
From: FChannel <>
Date: Wed, 7 Jul 2021 10:46:04 -0700
Subject: added media proxy for remote links

---
 static/ncatalog.html | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'static/ncatalog.html')

diff --git a/static/ncatalog.html b/static/ncatalog.html
index 1f6fc69..4c6c589 100644
--- a/static/ncatalog.html
+++ b/static/ncatalog.html
@@ -67,7 +67,7 @@
             img.style = "max-width: 180px; max-height: 180px;"
             img.setAttribute("id", "img")
             img.setAttribute("main", "1")
-            img.setAttribute("src", "{{ (index .Attachment 0).Href }}")
+            img.setAttribute("src", "{{ proxy (index .Attachment 0).Href }}")
             media.appendChild(img)
         }                                
 
@@ -75,7 +75,7 @@
             var audio = document.createElement("audio")
             audio.controls = 'controls'
             audio.preload    = 'metadata'              
-            audio.src      = '{{ (index .Attachment 0).Href }}'
+            audio.src      = '{{ proxy (index .Attachment 0).Href }}'
             audio.type     = '{{ (index .Attachment 0).MediaType }}'              
             audio.style = "margin-right: 10px; margin-bottom: 10px; max-width: 180px; max-height: 180px;"
             audio.innerText = 'Audio is not supported.'
@@ -87,7 +87,7 @@
             video.controls = 'controls'
             video.preload    = 'metadata'                          
             video.muted    = 'muted'              
-            video.src      = '{{ (index .Attachment 0).Href }}'
+            video.src      = '{{ proxy (index .Attachment 0).Href }}'
             video.type     = '{{ (index .Attachment 0).MediaType }}'              
             video.style = "margin-right: 10px; margin-bottom: 10px; max-width: 180px; max-height: 180px;"
             video.innerText = 'Video is not supported.'
-- 
cgit v1.2.3