hlx-url-rewriter
Advanced tools
Comparing version 0.0.24 to 0.0.25
@@ -89,2 +89,7 @@ const path = require('path'); | ||
function createAbsolutePath(url) { | ||
const {rootPath = '/'} = defaultFunc.options; | ||
return createPath(url, rootPath); | ||
} | ||
function rewrite(uri, base) { | ||
@@ -102,3 +107,8 @@ const {rootPath = '/'} = defaultFunc.options; | ||
} | ||
const result = createRelativePath(playlistUrl, url); | ||
let result; | ||
if (url.protocol === playlistUrl.protocol && url.hostname === playlistUrl.hostname) { | ||
result = createRelativePath(playlistUrl, url); | ||
} else { | ||
result = createAbsolutePath(url); | ||
} | ||
print(`\t>>> "${result}"`); | ||
@@ -105,0 +115,0 @@ return `${result}${url.search}${url.hash}`; |
{ | ||
"name": "hlx-url-rewriter", | ||
"version": "0.0.24", | ||
"version": "0.0.25", | ||
"description": "A transform stream to modify URLs contained in HLS playlists", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9704
136