From 892641bfac518cf13112e46e3f96324b2dfa7b4b Mon Sep 17 00:00:00 2001 From: Boris Date: Mon, 30 Aug 2021 10:09:24 +0200 Subject: [PATCH] [FIX] strip HOST in urls --- www/boris/youtube.php | 4 +--- www/boris/youtube_watch.php | 3 ++- www/boris/youtube_watch_step2.html | 8 ++++---- www/boris/youtube_watch_step3.html | 8 ++++---- zen/new_file_in_astroport.sh | 16 ++++++++-------- 5 files changed, 19 insertions(+), 20 deletions(-) diff --git a/www/boris/youtube.php b/www/boris/youtube.php index 0bf6ef5..375d0cc 100644 --- a/www/boris/youtube.php +++ b/www/boris/youtube.php @@ -16,8 +16,7 @@ foreach ($videos as $v) { list($category, $videoID, $p3, $videoName, $p5, $src, $p7, $definition, $videoURI) = explode(";", $v); - $videoURL = 'http://'. HOST. $videoURI; - $videoEco = 'http://'. HOST. '/ipns/' . $p7; + $videoEco = '/ipns/' . $p7; $mimeType = guessTypeFromFilename($videoURI); @@ -38,7 +37,6 @@ foreach ($videos as $v) { 'thumbURL' => $thumbURL, 'category' => $category, 'mime' => $mimeType, - 'url' => $videoURL, 'eco' => $videoEco, 'uri' => $videoURI, 'name' => $videoName, diff --git a/www/boris/youtube_watch.php b/www/boris/youtube_watch.php index e2c15c2..ee0a867 100644 --- a/www/boris/youtube_watch.php +++ b/www/boris/youtube_watch.php @@ -2,7 +2,8 @@ require_once('functions.php'); require_once('conf.php'); -$videoURL = 'http://'. HOST. htmlentities($_GET['uri']); +//$videoURL = 'http://'. HOST; +$videoURL = htmlentities($_GET['uri']); $videoName = htmlentities(urldecode($_GET['name'])); $videoMIME = htmlentities($_GET['mime']); diff --git a/www/boris/youtube_watch_step2.html b/www/boris/youtube_watch_step2.html index ef91dda..79f1a36 100644 --- a/www/boris/youtube_watch_step2.html +++ b/www/boris/youtube_watch_step2.html @@ -4,13 +4,13 @@ $TITLE in Astroport - - + +
- ASTROPORT ${XZUID} + ASTROPORT ${XZUID}
@@ -50,4 +50,4 @@
- + diff --git a/www/boris/youtube_watch_step3.html b/www/boris/youtube_watch_step3.html index a80a248..58eaeda 100644 --- a/www/boris/youtube_watch_step3.html +++ b/www/boris/youtube_watch_step3.html @@ -3,8 +3,8 @@ $TITLE in Astroport - - + +
@@ -16,8 +16,8 @@

diff --git a/zen/new_file_in_astroport.sh b/zen/new_file_in_astroport.sh index a594db1..bccaa34 100755 --- a/zen/new_file_in_astroport.sh +++ b/zen/new_file_in_astroport.sh @@ -298,13 +298,13 @@ cat >~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/index.html <$TITLE in Astroport - - + +
- ASTROPORT ${XZUID} + ASTROPORT ${XZUID}
@@ -344,7 +344,7 @@ cat >~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/index.html <
- + EOF @@ -358,8 +358,8 @@ cat > ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html < $TITLE in Astroport - - + +
@@ -371,8 +371,8 @@ cat > ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html <