forked from axiom-team/astrXbian
[FIX] strip HOST in urls
This commit is contained in:
parent
840bdedc2d
commit
892641bfac
|
@ -16,8 +16,7 @@ foreach ($videos as $v) {
|
||||||
list($category, $videoID, $p3, $videoName, $p5, $src, $p7, $definition, $videoURI) = explode(";", $v);
|
list($category, $videoID, $p3, $videoName, $p5, $src, $p7, $definition, $videoURI) = explode(";", $v);
|
||||||
|
|
||||||
|
|
||||||
$videoURL = 'http://'. HOST. $videoURI;
|
$videoEco = '/ipns/' . $p7;
|
||||||
$videoEco = 'http://'. HOST. '/ipns/' . $p7;
|
|
||||||
$mimeType = guessTypeFromFilename($videoURI);
|
$mimeType = guessTypeFromFilename($videoURI);
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,7 +37,6 @@ foreach ($videos as $v) {
|
||||||
'thumbURL' => $thumbURL,
|
'thumbURL' => $thumbURL,
|
||||||
'category' => $category,
|
'category' => $category,
|
||||||
'mime' => $mimeType,
|
'mime' => $mimeType,
|
||||||
'url' => $videoURL,
|
|
||||||
'eco' => $videoEco,
|
'eco' => $videoEco,
|
||||||
'uri' => $videoURI,
|
'uri' => $videoURI,
|
||||||
'name' => $videoName,
|
'name' => $videoName,
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
require_once('functions.php');
|
require_once('functions.php');
|
||||||
require_once('conf.php');
|
require_once('conf.php');
|
||||||
|
|
||||||
$videoURL = 'http://'. HOST. htmlentities($_GET['uri']);
|
//$videoURL = 'http://'. HOST;
|
||||||
|
$videoURL = htmlentities($_GET['uri']);
|
||||||
$videoName = htmlentities(urldecode($_GET['name']));
|
$videoName = htmlentities(urldecode($_GET['name']));
|
||||||
$videoMIME = htmlentities($_GET['mime']);
|
$videoMIME = htmlentities($_GET['mime']);
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
<title>$TITLE in Astroport</title>
|
<title>$TITLE in Astroport</title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="Refresh" content="7;URL=http://astroport/ipns/$IPNSLINK/${G1PUB}/">
|
<meta http-equiv="Refresh" content="7;URL=http://astroport/ipns/$IPNSLINK/${G1PUB}/">
|
||||||
<link rel='stylesheet' href='http://astroport/styles/astroport/style.css' type='text/css' />
|
<link rel='stylesheet' href='/astroport/style.css' type='text/css' />
|
||||||
<link rel='icon' type='image/png' href='http://astroport/styles/astroport/logo.png' />
|
<link rel='icon' type='image/png' href='/styles/astroport/logo.png' />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<h6>
|
<h6>
|
||||||
<a href='http://astroport/'><span>ASTROPORT</span> <q>${XZUID}</q></a>
|
<a href='/'><span>ASTROPORT</span> <q>${XZUID}</q></a>
|
||||||
</h6>
|
</h6>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
<head>
|
<head>
|
||||||
<title>$TITLE in Astroport</title>
|
<title>$TITLE in Astroport</title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='http://astroport/styles/astroport/style.css' type='text/css' />
|
<link rel='stylesheet' href='/styles/astroport/style.css' type='text/css' />
|
||||||
<link rel='icon' type='image/png' href='http://astroport/styles/astroport/logo.png' />
|
<link rel='icon' type='image/png' href='/styles/astroport/logo.png' />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
|
@ -16,8 +16,8 @@
|
||||||
<main>
|
<main>
|
||||||
<article>
|
<article>
|
||||||
<video autoplay="autoplay" controls>
|
<video autoplay="autoplay" controls>
|
||||||
<source src="http://astroport/ipfs/$IPFSREPFILEID/$URLENCODE_FILE_NAME">
|
<source src="/ipfs/$IPFSREPFILEID/$URLENCODE_FILE_NAME">
|
||||||
<a href="http://astroport/ipfs/$IPFSREPFILEID/$URLENCODE_FILE_NAME">$TITLE</a>
|
<a href="/ipfs/$IPFSREPFILEID/$URLENCODE_FILE_NAME">$TITLE</a>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
<h1 class="video-title">
|
<h1 class="video-title">
|
||||||
|
|
|
@ -298,13 +298,13 @@ cat >~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/index.html <<EOF
|
||||||
<title>$TITLE in Astroport</title>
|
<title>$TITLE in Astroport</title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="Refresh" content="7;URL=http://astroport/ipns/$IPNSLINK/${G1PUB}/">
|
<meta http-equiv="Refresh" content="7;URL=http://astroport/ipns/$IPNSLINK/${G1PUB}/">
|
||||||
<link rel='stylesheet' href='http://astroport/styles/astroport/style.css' type='text/css' />
|
<link rel='stylesheet' href='/astroport/style.css' type='text/css' />
|
||||||
<link rel='icon' type='image/png' href='http://astroport/styles/astroport/logo.png' />
|
<link rel='icon' type='image/png' href='/styles/astroport/logo.png' />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<h6>
|
<h6>
|
||||||
<a href='http://astroport/'><span>ASTROPORT</span> <q>${XZUID}</q></a>
|
<a href='/'><span>ASTROPORT</span> <q>${XZUID}</q></a>
|
||||||
</h6>
|
</h6>
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
|
@ -358,8 +358,8 @@ cat > ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html <<EOF
|
||||||
<head>
|
<head>
|
||||||
<title>$TITLE in Astroport</title>
|
<title>$TITLE in Astroport</title>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link rel='stylesheet' href='http://astroport/styles/astroport/style.css' type='text/css' />
|
<link rel='stylesheet' href='/styles/astroport/style.css' type='text/css' />
|
||||||
<link rel='icon' type='image/png' href='http://astroport/styles/astroport/logo.png' />
|
<link rel='icon' type='image/png' href='/styles/astroport/logo.png' />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
|
@ -371,8 +371,8 @@ cat > ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html <<EOF
|
||||||
<main>
|
<main>
|
||||||
<article>
|
<article>
|
||||||
<video autoplay="autoplay" controls>
|
<video autoplay="autoplay" controls>
|
||||||
<source src="http://astroport/ipfs/$IPFSREPFILEID/$URLENCODE_FILE_NAME">
|
<source src="/ipfs/$IPFSREPFILEID/$URLENCODE_FILE_NAME">
|
||||||
<a href="http://astroport/ipfs/$IPFSREPFILEID/$URLENCODE_FILE_NAME">$TITLE</a>
|
<a href="/ipfs/$IPFSREPFILEID/$URLENCODE_FILE_NAME">$TITLE</a>
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
<h1 class="video-title">
|
<h1 class="video-title">
|
||||||
|
|
Loading…
Reference in New Issue